"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@xxxxxxxxxx> --- drivers/pwm/pwm-imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c index 55a3a363d5be..b8452abe2392 100644 --- a/drivers/pwm/pwm-imx.c +++ b/drivers/pwm/pwm-imx.c @@ -128,8 +128,9 @@ static void imx_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state) { struct imx_chip *imx = to_imx_chip(chip); - u32 period, prescaler, pwm_clk, ret, val; + u32 period, prescaler, pwm_clk, val; u64 tmp; + int ret; ret = imx_pwm_clk_prepare_enable(chip); if (ret < 0) -- 2.17.1