From: Wan Jiabing Date: Fri, 8 Apr 2022 08:30:07 +0000 (+0800) Subject: pwm: sifive: Simplify if-if to if-else X-Git-Tag: v5.19-rc1~80^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=762c4e7fce551fbd617ae79e55fc8d9850627b8f;p=thirdparty%2Fkernel%2Flinux.git pwm: sifive: Simplify if-if to if-else Use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c index 253c4a17d2553..e6d05a3290026 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; }