mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
pwm: imx: Signedness bug in imx_pwm_get_state()
"ret" only holds zero and negative error codes. It needs to be signed
for the error handling to work.
Fixes: 9f4c8f9607 ("pwm: imx: Add ipg clock operation")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
This commit is contained in:
parent
d80f820690
commit
7ca17b2071
1 changed files with 2 additions and 1 deletions
|
|
@ -115,8 +115,9 @@ static void pwm_imx27_get_state(struct pwm_chip *chip,
|
|||
struct pwm_device *pwm, struct pwm_state *state)
|
||||
{
|
||||
struct pwm_imx27_chip *imx = to_pwm_imx27_chip(chip);
|
||||
u32 period, prescaler, pwm_clk, ret, val;
|
||||
u32 period, prescaler, pwm_clk, val;
|
||||
u64 tmp;
|
||||
int ret;
|
||||
|
||||
ret = pwm_imx27_clk_prepare_enable(chip);
|
||||
if (ret < 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue