From: Jingoo Han <jg1.han@samsung.com>
To: 'Wei Yongjun' <weiyj.lk@gmail.com>
Cc: 'Andrew Morton' <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, michael.hennerich@analog.com,
rpurdie@rpsys.net, FlorianSchandinat@gmx.de,
yongjun_wei@trendmicro.com.cn,
device-drivers-devel@blackfin.uclinux.org,
linux-fbdev@vger.kernel.org, 'Jingoo Han' <jg1.han@samsung.com>
Subject: Re: [PATCH -next] backlight: adp8860: fix error return code in adp8860_led_probe()
Date: Mon, 25 Mar 2013 04:29:09 +0000 [thread overview]
Message-ID: <00c801ce2911$4b3db080$e1b91180$%han@samsung.com> (raw)
In-Reply-To: <CAPgLHd-wxGVKjMpWPDeKqWM+Va6dLnu_spwyb=QUybxjOo=AWA@mail.gmail.com>
On Friday, March 22, 2013 8: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>
CC'ed Andrdew Morton, linux-kernel@vger.kernel.org
Acked-by: Jingoo Han <jg1.han@samsung.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;
> }
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" 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:[~2013-03-25 4:29 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 [this message]
2013-03-25 8:41 ` Michael Hennerich
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='00c801ce2911$4b3db080$e1b91180$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=FlorianSchandinat@gmx.de \
--cc=akpm@linux-foundation.org \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=rpurdie@rpsys.net \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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).