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>
This commit is contained in:
Beniamino Galvani 2014-05-05 23:29:00 +02:00 committed by Thierry Reding
parent 257462dbf3
commit 5b1e8e0653
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}