mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
This commit is contained in:
parent
257462dbf3
commit
5b1e8e0653
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue