From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
Luotao Fu <l.fu@pengutronix.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] leds: leds-pwm: return proper error if pwm_request failed
Date: Thu, 20 Jan 2011 00:22:07 -0800 [thread overview]
Message-ID: <20110120082207.GD2498@core.coreip.homeip.net> (raw)
In-Reply-To: <1295494735.20884.1.camel@mola>
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@gmail.com>
Looks good.
Reviewed-by: Dmitry Torokhov <dtor@mail.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
prev parent reply other threads:[~2011-01-20 8:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-20 3:38 Axel Lin
2011-01-20 8:22 ` Dmitry Torokhov [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=20110120082207.GD2498@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=axel.lin@gmail.com \
--cc=l.fu@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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
all inboxes | Powered by JetHome®