linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Samreen <samreen@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	Samreen <samreen@ti.com>
Subject: [PATCH] OMAP: DSS2: OMAPFB: Fix null pointer check
Date: Fri, 12 Nov 2010 11:59:15 +0000	[thread overview]
Message-ID: <1289562435-8056-1-git-send-email-samreen@ti.com> (raw)
In-Reply-To: <AANLkTik2WToLpQCK7zM+4xwwnbxY_PbRnZF-H40iYhuW@mail.gmail.com>

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


       reply	other threads:[~2010-11-12 11:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12 11:59 Samreen [this message]
2010-11-12 11:58 ` [PATCH] OMAP: DSS2: OMAPFB: Fix null pointer check Belisko Marek
2010-11-15 12:57   ` Nilofer, Samreen
2010-11-12 12:07 ` Ville Syrjälä
2010-11-15 12:58   ` Nilofer, Samreen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289562435-8056-1-git-send-email-samreen@ti.com \
    --to=samreen@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).