projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
257462d
)
pwm: spear: fix check on pwmchip_add() return value
author
Beniamino Galvani
<b.galvani@gmail.com>
Mon, 5 May 2014 21:29:00 +0000
(23:29 +0200)
committer
Thierry Reding
<thierry.reding@gmail.com>
Wed, 7 May 2014 08:21:05 +0000
(10:21 +0200)
pwmchip_add() returns zero on success and a negative value on error,
so the condition of the check must be inverted.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-spear.c
patch
|
blob
|
history
diff --git
a/drivers/pwm/pwm-spear.c
b/drivers/pwm/pwm-spear.c
index b4f6d0df5f2d306f8f5f452b6b8ea9f3cf5d814f..cffa1e390320936abfc61c969b20c71ddf13b29b 100644
(file)
--- a/
drivers/pwm/pwm-spear.c
+++ b/
drivers/pwm/pwm-spear.c
@@
-220,7
+220,7
@@
static int spear_pwm_probe(struct platform_device *pdev)
}
ret = pwmchip_add(&pc->chip);
- if (
!ret
) {
+ if (
ret < 0
) {
clk_unprepare(pc->clk);
dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
}