Skip to content

Commit

Permalink
pwm: rockchip: 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: 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>
  • Loading branch information
Uwe Kleine-König authored and Thierry Reding committed Dec 6, 2022
1 parent 2f47786 commit 790a8ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pwm/pwm-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 790a8ba

Please sign in to comment.