linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 2/4 v2] fbdev: export fb_edid_add_monspecs() for modules, improve algorithm
Date: Wed, 10 Nov 2010 04:14:41 +0000	[thread overview]
Message-ID: <20101110041441.GA30931@linux-sh.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1011021140390.4552@axis700.grange>

On Tue, Nov 02, 2010 at 11:47:36AM +0100, Guennadi Liakhovetski wrote:
> diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
> index a0b5a93..38b3c30 100644
> --- a/drivers/video/fbmon.c
> +++ b/drivers/video/fbmon.c
> @@ -973,58 +973,56 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
>  	DPRINTK("====================\n");
>  }
>  
> +/**
> + * fb_edid_add_monspecs() - add monitor video modes from E-EDID data
> + * @edid:	128 byte array with an E-EDID block
> + * @spacs:	monitor specs to be extended
> + */
>  void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
>  {
[snip]
>  	m = kzalloc((specs->modedb_len + num) *
>  		       sizeof(struct fb_videomode), GFP_KERNEL);
>  
> -	if (!m) {
> -		kfree(mode);
> +	if (!m)
>  		return;
> +
This can obviously fail, and should be returning the error value instead
of simply quashing it.

  reply	other threads:[~2010-11-10  4:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 10:47 [PATCH 2/4 v2] fbdev: export fb_edid_add_monspecs() for modules, Guennadi Liakhovetski
2010-11-10  4:14 ` Paul Mundt [this message]
2010-11-10  4:34 ` [PATCH 2/4 v2] fbdev: export fb_edid_add_monspecs() for modules, improve algorithm Paul Mundt
2010-11-11 12:58 ` [PATCH 2/4 v2] fbdev: export fb_edid_add_monspecs() for modules, Guennadi Liakhovetski

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=20101110041441.GA30931@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-fbdev@vger.kernel.org \
    /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).