diff options
author | Wan Jiabing | 2022-04-08 16:30:07 +0800 |
---|---|---|
committer | Thierry Reding | 2022-05-20 15:57:43 +0200 |
commit | 762c4e7fce551fbd617ae79e55fc8d9850627b8f (patch) | |
tree | c5f9cc20b12c3f15e60fa878dc3d76fc98513fc4 /drivers/pwm/pwm-sifive.c | |
parent | 2bf8ee0faa988b5cec3503ebf2f970a0e84d24ee (diff) |
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>
Diffstat (limited to 'drivers/pwm/pwm-sifive.c')
-rw-r--r-- | drivers/pwm/pwm-sifive.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c index 253c4a17d255..e6d05a329002 100644 --- a/drivers/pwm/pwm-sifive.c +++ b/drivers/pwm/pwm-sifive.c @@ -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; } |