Skip to content

Commit 500f879

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
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 <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 790a8ba commit 500f879

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pwm/pwm-sprd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int sprd_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
8383
if (ret) {
8484
dev_err(spc->dev, "failed to enable pwm%u clocks\n",
8585
pwm->hwpwm);
86-
return 0;
86+
return ret;
8787
}
8888

8989
val = sprd_pwm_read(spc, pwm->hwpwm, SPRD_PWM_ENABLE);

0 commit comments

Comments
 (0)