aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/omapfb
diff options
context:
space:
mode:
authorJani Nikula <ext-jani.1.nikula@nokia.com>2010-06-01 15:12:12 +0300
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-08-05 16:52:08 +0300
commit9325588757aa7d08bf2ca9c63b669d0d7aa2fc40 (patch)
tree4fc5823cb5cdf06ecd0baeedc99ae4ac6f6f41ed /drivers/video/omap2/omapfb
parentffb63c95b2fa52b02b45537d18f0ca698bef5496 (diff)
downloadkernel_goldelico_gta04-9325588757aa7d08bf2ca9c63b669d0d7aa2fc40.zip
kernel_goldelico_gta04-9325588757aa7d08bf2ca9c63b669d0d7aa2fc40.tar.gz
kernel_goldelico_gta04-9325588757aa7d08bf2ca9c63b669d0d7aa2fc40.tar.bz2
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>
Diffstat (limited to 'drivers/video/omap2/omapfb')
-rw-r--r--drivers/video/omap2/omapfb/omapfb-ioctl.c2
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c
index d1f56d3..994f6a0 100644
--- a/drivers/video/omap2/omapfb/omapfb-ioctl.c
+++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c
@@ -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;
}
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index a545e8d..db307e3 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -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) {