Skip to content

Commit

Permalink
pwm: sprd: Propagate errors in .get_state() to the caller
Browse files Browse the repository at this point in the history
.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>
  • Loading branch information
Uwe Kleine-König authored and Thierry Reding committed Dec 6, 2022
1 parent 790a8ba commit 500f879
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pwm/pwm-sprd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 500f879

Please sign in to comment.