Skip to content

Commit 762c4e7

Browse files
Wan Jiabingthierryreding
authored andcommitted
pwm: sifive: Simplify if-if to if-else
Use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 2bf8ee0 commit 762c4e7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/pwm/pwm-sifive.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,9 @@ static int pwm_sifive_enable(struct pwm_chip *chip, bool enable)
138138
dev_err(ddata->chip.dev, "Enable clk failed\n");
139139
return ret;
140140
}
141-
}
142-
143-
if (!enable)
141+
} else {
144142
clk_disable(ddata->clk);
143+
}
145144

146145
return 0;
147146
}

0 commit comments

Comments
 (0)