OMAP: DSS2: OMAPFB: Check fb2display() return value
Make sure NULL return value of fb2display() is not referenced. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
This commit is contained in:
Родитель
ffb63c95b2
Коммит
9325588757
|
@ -858,7 +858,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!display->driver->enable_te) {
|
||||
if (!display || !display->driver->enable_te) {
|
||||
r = -ENODEV;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1271,6 +1271,9 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
|
|||
int do_update = 0;
|
||||
int r = 0;
|
||||
|
||||
if (!display)
|
||||
return -EINVAL;
|
||||
|
||||
omapfb_lock(fbdev);
|
||||
|
||||
switch (blank) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче