From 9325588757aa7d08bf2ca9c63b669d0d7aa2fc40 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 1 Jun 2010 15:12:12 +0300 Subject: 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 Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/omapfb/omapfb-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/omap2/omapfb/omapfb-ioctl.c') diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c index d1f56d37405f..994f6a091b49 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; } -- cgit v1.2.3