lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-id: <00c801ce2911$4b3db080$e1b91180$%han@samsung.com>
Date:	Mon, 25 Mar 2013 13:29:09 +0900
From:	Jingoo Han <jg1.han@...sung.com>
To:	'Wei Yongjun' <weiyj.lk@...il.com>
Cc:	'Andrew Morton' <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, michael.hennerich@...log.com,
	rpurdie@...ys.net, FlorianSchandinat@....de,
	yongjun_wei@...ndmicro.com.cn,
	device-drivers-devel@...ckfin.uclinux.org,
	linux-fbdev@...r.kernel.org, 'Jingoo Han' <jg1.han@...sung.com>
Subject: Re: [PATCH -next] backlight: adp8860: fix error return code in
 adp8860_led_probe()

On Friday, March 22, 2013 8:30 PM, Wei Yongjun wrote:
> 
> From: Wei Yongjun <yongjun_wei@...ndmicro.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@...ndmicro.com.cn>

CC'ed Andrdew Morton, linux-kernel@...r.kernel.org


Acked-by: Jingoo Han <jg1.han@...sung.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@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ