[PATCH] OMAP: FB: Fix Null pointer check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Satish Kumar <satish.k@xxxxxx>

Fix Null pointer check for display pointer in omapfb_blank().

Signed-off-by: Satish Kumar <satish.k@xxxxxx>
Signed-off-by: Manjunatha GK <manjugk@xxxxxx>
Cc: Tony Lindgren <tony@xxxxxxxxxxx>
---
 drivers/video/omap2/omapfb/omapfb-main.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 4b4506d..63268cf 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1217,6 +1217,11 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
 	int do_update = 0;
 	int r = 0;
 
+	if (display == NULL) {
+		printk(KERN_ERR "omapfb_blank: fb2display returned NULL\n");
+		return -EINVAL;
+	}
+
 	omapfb_lock(fbdev);
 
 	switch (blank) {
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux