summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-rockchip.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-12-02 21:35:34 +0300
committerThierry Reding <thierry.reding@gmail.com>2022-12-06 14:46:28 +0300
commit790a8bae62f701821305dac37a9f6013cde8488f (patch)
treeccd9baec7f058ae1f3e8f83b7caee0402a4afbef /drivers/pwm/pwm-rockchip.c
parent2f47786ce460206f2ff8ecb7d19352e2307b5511 (diff)
downloadlinux-790a8bae62f701821305dac37a9f6013cde8488f.tar.xz
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 <heiko@sntech.de> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20221130152148.2769768-10-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>
Diffstat (limited to 'drivers/pwm/pwm-rockchip.c')
-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);