linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] neofb: fix error return code in neofb_probe()
Date: Thu, 26 Sep 2013 08:46:13 +0000	[thread overview]
Message-ID: <5243F455.7020202@ti.com> (raw)
In-Reply-To: <CAPgLHd8sm1rhuuG7TJqAfWesiSDf6MaM4E4VCrrWXGziLEiYVA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]

On 23/09/13 18:00, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/video/neofb.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
> index 891b0bf..2a3e5bd 100644
> --- a/drivers/video/neofb.c
> +++ b/drivers/video/neofb.c
> @@ -2075,6 +2075,7 @@ static int neofb_probe(struct pci_dev *dev, const struct pci_device_id *id)
>  	if (!fb_find_mode(&info->var, info, mode_option, NULL, 0,
>  			info->monspecs.modedb, 16)) {
>  		printk(KERN_ERR "neofb: Unable to find usable video mode.\n");
> +		err = -EINVAL;
>  		goto err_map_video;
>  	}
>  
> @@ -2097,7 +2098,8 @@ static int neofb_probe(struct pci_dev *dev, const struct pci_device_id *id)
>  	       info->fix.smem_len >> 10, info->var.xres,
>  	       info->var.yres, h_sync / 1000, h_sync % 1000, v_sync);
>  
> -	if (fb_alloc_cmap(&info->cmap, 256, 0) < 0)
> +	err = fb_alloc_cmap(&info->cmap, 256, 0);
> +	if (err < 0)
>  		goto err_map_video;
>  
>  	err = register_framebuffer(info);
> 

Thanks, queuing for 3.12 fixes.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

      reply	other threads:[~2013-09-26  8:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23 15:00 [PATCH] neofb: fix error return code in neofb_probe() Wei Yongjun
2013-09-26  8:46 ` Tomi Valkeinen [this message]

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=5243F455.7020202@ti.com \
    --to=tomi.valkeinen@ti.com \
    --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).