linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hennerich <michael.hennerich@analog.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH -next] backlight: adp8860: fix error return code in adp8860_led_probe()
Date: Mon, 25 Mar 2013 08:41:57 +0000	[thread overview]
Message-ID: <51500DD5.8060504@analog.com> (raw)
In-Reply-To: <CAPgLHd-wxGVKjMpWPDeKqWM+Va6dLnu_spwyb=QUybxjOo=AWA@mail.gmail.com>

On 03/22/2013 12:30 PM, 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 returned elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> ---
>   drivers/video/backlight/adp8860_bl.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
> index 6bb7f36..75b10f8 100644
> --- a/drivers/video/backlight/adp8860_bl.c
> +++ b/drivers/video/backlight/adp8860_bl.c
> @@ -249,12 +249,14 @@ static int adp8860_led_probe(struct i2c_client *client)
>   		if (led_dat->id > 7 || led_dat->id < 1) {
>   			dev_err(&client->dev, "Invalid LED ID %d\n",
>   				led_dat->id);
> +			ret = -EINVAL;
>   			goto err;
>   		}
>   
>   		if (pdata->bl_led_assign & (1 << (led_dat->id - 1))) {
>   			dev_err(&client->dev, "LED %d used by Backlight\n",
>   				led_dat->id);
> +			ret = -EBUSY;
>   			goto err;
>   		}
>   
>
>
>


-- 
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif



      parent reply	other threads:[~2013-03-25  8:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 11:30 [PATCH -next] backlight: adp8860: fix error return code in adp8860_led_probe() Wei Yongjun
2013-03-25  4:29 ` Jingoo Han
2013-03-25  8:41 ` Michael Hennerich [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=51500DD5.8060504@analog.com \
    --to=michael.hennerich@analog.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).