mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
video: fbdev: stifb: handle NULL return value from ioremap_nocache
Add missing error check for ioremap_nocache() failure (prevents NULL pointer dereference on error). Cc: "James E.J. Bottomley" <[email protected]> Cc: Helge Deller <[email protected]> Signed-off-by: Arvind Yadav <[email protected]> [b.zolnierkie: minor fixes] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
parent
f998ff681c
commit
74a2b96e61
1 changed files with 4 additions and 0 deletions
|
|
@ -1294,6 +1294,10 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||
strcpy(fix->id, "stifb");
|
||||
info->fbops = &stifb_ops;
|
||||
info->screen_base = ioremap_nocache(REGION_BASE(fb,1), fix->smem_len);
|
||||
if (!info->screen_base) {
|
||||
printk(KERN_ERR "stifb: failed to map memory\n");
|
||||
goto out_err0;
|
||||
}
|
||||
info->screen_size = fix->smem_len;
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA;
|
||||
info->pseudo_palette = &fb->pseudo_palette;
|
||||
|
|
|
|||
Loading…
Reference in a new issue