summaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorBeniamino Galvani <b.galvani@gmail.com>2014-05-05 23:29:00 +0200
committerThierry Reding <thierry.reding@gmail.com>2014-05-07 10:21:05 +0200
commit5b1e8e0653760ade53c0c7caaa9278c57361cb8b (patch)
tree51d7110307f587e08ef3b445cae1b18784d12729 /drivers/pwm
parent257462dbf3ed233de0dc2e489dcc58579535b33f (diff)
downloadop-kernel-dev-5b1e8e0653760ade53c0c7caaa9278c57361cb8b.zip
op-kernel-dev-5b1e8e0653760ade53c0c7caaa9278c57361cb8b.tar.gz
pwm: spear: fix check on pwmchip_add() return value
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>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-spear.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
index b4f6d0d..cffa1e3 100644
--- 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);
}
OpenPOWER on IntegriCloud