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:
Родитель
257462dbf3
Коммит
5b1e8e0653
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче