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:
Jani Nikula 2010-06-01 15:12:12 +03:00 committed by Tomi Valkeinen
parent ffb63c95b2
commit 9325588757
2 changed files with 4 additions and 1 deletions

View File

@ -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;
}

View File

@ -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) {