diff mbox

OMAP: DSS2: OMAPFB: Fix null pointer check

Message ID 1289562435-8056-1-git-send-email-samreen@ti.com (mailing list archive)
State Superseded
Delegated to: Tomi Valkeinen
Headers show

Commit Message

Samreen Nov. 12, 2010, 11:47 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 6a704f1..55bed89 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2133,6 +2133,8 @@  static int omapfb_parse_def_modes(struct omapfb2_device *fbdev)
 	int r = 0;
 
 	str = kmalloc(strlen(def_mode) + 1, GFP_KERNEL);
+	if (str == NULL)
+		return -EINVAL;
 	strcpy(str, def_mode);
 	options = str;