diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-12-02 19:35:33 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2022-12-06 12:46:27 +0100 |
commit | 2f47786ce460206f2ff8ecb7d19352e2307b5511 (patch) | |
tree | 4fc6707c56a5bd38743a161f228475aa60296e21 /drivers/pwm/pwm-mtk-disp.c | |
parent | 51b9f2fb38bd209bbfa49e1eca2e262667f29e48 (diff) | |
download | linux-2f47786ce460206f2ff8ecb7d19352e2307b5511.tar.gz linux-2f47786ce460206f2ff8ecb7d19352e2307b5511.tar.bz2 linux-2f47786ce460206f2ff8ecb7d19352e2307b5511.zip |
pwm: mtk-disp: 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: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20221130152148.2769768-9-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-mtk-disp.c')
-rw-r--r-- | drivers/pwm/pwm-mtk-disp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c index ccf0ccdef29d..692a06121b28 100644 --- a/drivers/pwm/pwm-mtk-disp.c +++ b/drivers/pwm/pwm-mtk-disp.c @@ -184,14 +184,14 @@ static int mtk_disp_pwm_get_state(struct pwm_chip *chip, err = clk_prepare_enable(mdp->clk_main); if (err < 0) { dev_err(chip->dev, "Can't enable mdp->clk_main: %pe\n", ERR_PTR(err)); - return 0; + return err; } err = clk_prepare_enable(mdp->clk_mm); if (err < 0) { dev_err(chip->dev, "Can't enable mdp->clk_mm: %pe\n", ERR_PTR(err)); clk_disable_unprepare(mdp->clk_main); - return 0; + return err; } rate = clk_get_rate(mdp->clk_main); |