* [PATCH -next] backlight: adp8860: fix error return code in adp8860_led_probe()
@ 2013-03-22 11:30 Wei Yongjun
2013-03-25 4:29 ` Jingoo Han
2013-03-25 8:41 ` Michael Hennerich
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2013-03-22 11:30 UTC (permalink / raw)
To: linux-fbdev
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>
---
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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] backlight: adp8860: fix error return code in adp8860_led_probe()
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
1 sibling, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2013-03-25 4:29 UTC (permalink / raw)
To: 'Wei Yongjun'
Cc: 'Andrew Morton', linux-kernel, michael.hennerich, rpurdie,
FlorianSchandinat, yongjun_wei, device-drivers-devel, linux-fbdev,
'Jingoo Han'
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] backlight: adp8860: fix error return code in adp8860_led_probe()
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
1 sibling, 0 replies; 3+ messages in thread
From: Michael Hennerich @ 2013-03-25 8:41 UTC (permalink / raw)
To: linux-fbdev
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-25 8:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).