From: "Ville Syrjälä" <ville.syrjala@nokia.com>
To: ext Samreen <samreen@ti.com>
Cc: "Valkeinen Tomi (Nokia-MS/Helsinki)" <Tomi.Valkeinen@nokia.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>
Subject: Re: [PATCH] OMAP: DSS2: OMAPFB: Fix null pointer check
Date: Fri, 12 Nov 2010 14:07:06 +0200 [thread overview]
Message-ID: <20101112120705.GF27763@nokia.com> (raw)
In-Reply-To: <1289562435-8056-1-git-send-email-samreen@ti.com>
On Fri, Nov 12, 2010 at 12:47:15PM +0100, ext Samreen wrote:
> 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);
While you're at it you could change the code to use kstrdup().
--
Ville Syrjälä
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-11-12 12:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 11:47 [PATCH] OMAP: DSS2: OMAPFB: Fix null pointer check Samreen
2010-11-12 11:58 ` Belisko Marek
2010-11-15 12:45 ` Nilofer, Samreen
2010-11-12 12:07 ` Ville Syrjälä [this message]
2010-11-15 12:46 ` 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=20101112120705.GF27763@nokia.com \
--to=ville.syrjala@nokia.com \
--cc=Tomi.Valkeinen@nokia.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=samreen@ti.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