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