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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 20 Jan 2011 00:22:07 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel@...r.kernel.org, Richard Purdie <rpurdie@...ys.net>,
	Luotao Fu <l.fu@...gutronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] leds: leds-pwm: return proper error if pwm_request failed

On Thu, Jan 20, 2011 at 11:38:55AM +0800, Axel Lin wrote:
> Return PTR_ERR(led_dat->pwm) instead of 0 if pwm_request failed
> 
> Signed-off-by: Axel Lin <axel.lin@...il.com>

Looks good.

Reviewed-by: Dmitry Torokhov <dtor@...l.ru>

> ---
>  drivers/leds/leds-pwm.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
> index da3fa8d..666daf7 100644
> --- a/drivers/leds/leds-pwm.c
> +++ b/drivers/leds/leds-pwm.c
> @@ -69,6 +69,7 @@ static int led_pwm_probe(struct platform_device *pdev)
>  		led_dat->pwm = pwm_request(cur_led->pwm_id,
>  				cur_led->name);
>  		if (IS_ERR(led_dat->pwm)) {
> +			ret = PTR_ERR(led_dat->pwm);
>  			dev_err(&pdev->dev, "unable to request PWM %d\n",
>  					cur_led->pwm_id);
>  			goto err;

-- 
Dmitry
--
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