projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f95ba94
)
leds: leds-pwm: return proper error if pwm_request failed
author
Axel Lin
<
[email protected]
>
Tue, 25 Jan 2011 23:07:14 +0000
(15:07 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 26 Jan 2011 00:49:58 +0000
(10:49 +1000)
Return PTR_ERR(led_dat->pwm) instead of 0 if pwm_request failed
Signed-off-by: Axel Lin <
[email protected]
>
Cc: Richard Purdie <
[email protected]
>
Cc: Luotao Fu <
[email protected]
>
Cc: Reviewed-by: Dmitry Torokhov <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/leds/leds-pwm.c
patch
|
blob
|
history
diff --git
a/drivers/leds/leds-pwm.c
b/drivers/leds/leds-pwm.c
index da3fa8dcdf5b924f71a7f117c05009f0fc671514..666daf77872e56239bbf59a002c180593996ae7a 100644
(file)
--- 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;