aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <[email protected]>2022-12-02 19:35:34 +0100
committerThierry Reding <[email protected]>2022-12-06 12:46:28 +0100
commit790a8bae62f701821305dac37a9f6013cde8488f (patch)
treeccd9baec7f058ae1f3e8f83b7caee0402a4afbef
parent2f47786ce460206f2ff8ecb7d19352e2307b5511 (diff)
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]>
-rw-r--r--drivers/pwm/pwm-rockchip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index 3ec7d1756903..7f084eb34092 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -70,11 +70,11 @@ static int rockchip_pwm_get_state(struct pwm_chip *chip,
ret = clk_enable(pc->pclk);
if (ret)
- return 0;
+ return ret;
ret = clk_enable(pc->clk);
if (ret)
- return 0;
+ return ret;
clk_rate = clk_get_rate(pc->clk);