mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
pwm: sifive: Simplify if-if to if-else
Use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
2bf8ee0faa
commit
762c4e7fce
@ -138,10 +138,9 @@ static int pwm_sifive_enable(struct pwm_chip *chip, bool enable)
|
||||
dev_err(ddata->chip.dev, "Enable clk failed\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (!enable)
|
||||
} else {
|
||||
clk_disable(ddata->clk);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user