diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-12-02 19:35:32 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2022-12-06 12:46:26 +0100 |
commit | 51b9f2fb38bd209bbfa49e1eca2e262667f29e48 (patch) | |
tree | 40291c98d08d58a0436c4027a5d3fe7621062121 /drivers | |
parent | ee02c1cb87f957ff0c66337d776486e72967987d (diff) |
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: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20221130152148.2769768-8-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pwm/pwm-imx27.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c index 3a22c2fddc45..29a3089c534c 100644 --- a/drivers/pwm/pwm-imx27.c +++ b/drivers/pwm/pwm-imx27.c @@ -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); |