diff options
author | Dan Carpenter | 2019-01-09 11:27:47 +0300 |
---|---|---|
committer | Thierry Reding | 2019-01-16 08:45:38 +0100 |
commit | 7ca17b207127240b1e4c8687ba7b9077e655336d (patch) | |
tree | d87db62c5dc432a49cb12e2eb205b804904a66a9 /drivers/pwm/pwm-imx27.c | |
parent | d80f8206905c1a8c3857d90f12bbfd6293b48a4b (diff) |
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: 9f4c8f9607c3 ("pwm: imx: Add ipg clock operation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-imx27.c')
-rw-r--r-- | drivers/pwm/pwm-imx27.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c index 8b8b1c6b7f29..55666cca4cee 100644 --- a/drivers/pwm/pwm-imx27.c +++ b/drivers/pwm/pwm-imx27.c @@ -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) |