linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP: DSS2: OMAPFB: Fix null pointer check
  2010-11-12 11:58 ` Belisko Marek
@ 2010-11-12 11:59 Samreen
  2010-11-12 11:58 ` Belisko Marek
  2010-11-12 12:07 ` Ville Syrjälä
  0 siblings, 2 replies; 5+ messages in thread
From: Samreen @ 2010-11-12 11:59 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev, Samreen

A null pointer check added.

Signed-off-by: Samreen <samreen@ti.com>
---
 drivers/video/omap2/omapfb/omapfb-main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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;
 
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-15 12:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-12 11:59 [PATCH] OMAP: DSS2: OMAPFB: Fix null pointer check Samreen
2010-11-12 11:58 ` Belisko Marek
2010-11-15 12:57   ` Nilofer, Samreen
2010-11-12 12:07 ` Ville Syrjälä
2010-11-15 12:58   ` Nilofer, Samreen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).