Skip to content

Commit 790a8ba

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: rockchip: 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: Heiko Stuebner <[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 2f47786 commit 790a8ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pwm/pwm-rockchip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ static int rockchip_pwm_get_state(struct pwm_chip *chip,
7070

7171
ret = clk_enable(pc->pclk);
7272
if (ret)
73-
return 0;
73+
return ret;
7474

7575
ret = clk_enable(pc->clk);
7676
if (ret)
77-
return 0;
77+
return ret;
7878

7979
clk_rate = clk_get_rate(pc->clk);
8080

0 commit comments

Comments
 (0)