Commit 51b9f2fb authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding

pwm: imx27: Propagate errors in .get_state() to the caller

.get_state() can return an error indication. Make use of it to propagate
failing hardware accesses.
Acked-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20221130152148.2769768-8-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent ee02c1cb
......@@ -128,7 +128,7 @@ static int pwm_imx27_get_state(struct pwm_chip *chip,
ret = pwm_imx27_clk_prepare_enable(imx);
if (ret < 0)
return 0;
return ret;
val = readl(imx->mmio_base + MX3_PWMCR);
......
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