提交 93255887 编写于 作者: J Jani Nikula 提交者: Tomi Valkeinen

OMAP: DSS2: OMAPFB: Check fb2display() return value

Make sure NULL return value of fb2display() is not referenced. Found by
Coverity.
Signed-off-by: NJani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@nokia.com>
上级 ffb63c95
...@@ -858,7 +858,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) ...@@ -858,7 +858,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
break; break;
} }
if (!display->driver->enable_te) { if (!display || !display->driver->enable_te) {
r = -ENODEV; r = -ENODEV;
break; break;
} }
......
...@@ -1271,6 +1271,9 @@ static int omapfb_blank(int blank, struct fb_info *fbi) ...@@ -1271,6 +1271,9 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
int do_update = 0; int do_update = 0;
int r = 0; int r = 0;
if (!display)
return -EINVAL;
omapfb_lock(fbdev); omapfb_lock(fbdev);
switch (blank) { switch (blank) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册