Commit 7ca17b20 authored by Dan Carpenter's avatar Dan Carpenter Committed by Thierry Reding

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: 9f4c8f96 ("pwm: imx: Add ipg clock operation")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent d80f8206
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment