Commit 790a8bae authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding

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: default avatarHeiko Stuebner <heiko@sntech.de>
Acked-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20221130152148.2769768-10-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 2f47786c
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment