mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
pwm: sprd: Propagate errors in .get_state() to the caller
.get_state() can return an error indication. Make use of it to propagate failing hardware accesses. Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20221130152148.2769768-11-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>
This commit is contained in:
parent
790a8bae62
commit
500f879843
|
@ -83,7 +83,7 @@ static int sprd_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
|
|||
if (ret) {
|
||||
dev_err(spc->dev, "failed to enable pwm%u clocks\n",
|
||||
pwm->hwpwm);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
val = sprd_pwm_read(spc, pwm->hwpwm, SPRD_PWM_ENABLE);
|
||||
|
|
Loading…
Reference in a new issue