summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-sifive.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-07-07 18:28:33 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-21 15:15:37 +0200
commit6d7f7ffbcdb9c043409cee13664d13a07c70bbc4 (patch)
tree951d87a39e2d2185193f95957a34e35eb81ac9a2 /drivers/pwm/pwm-sifive.c
parentb7e2d64d673abdecae8b8f3f44ef37820e7e8f6c (diff)
pwm: sifive: Don't check the return code of pwmchip_remove()
[ Upstream commit ceb2c2842f3664dcc4e6d8cb317e1e83bb81b1e5 ] pwmchip_remove() returns always 0. Don't use the value to make it possible to eventually change the function to return void. Also the driver core ignores the return value of pwm_sifive_remove(). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/pwm/pwm-sifive.c')
-rw-r--r--drivers/pwm/pwm-sifive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c
index 2485fbaaead22..8c6de4f410768 100644
--- a/drivers/pwm/pwm-sifive.c
+++ b/drivers/pwm/pwm-sifive.c
@@ -296,7 +296,7 @@ static int pwm_sifive_remove(struct platform_device *dev)
struct pwm_sifive_ddata *ddata = platform_get_drvdata(dev);
bool is_enabled = false;
struct pwm_device *pwm;
- int ret, ch;
+ int ch;
for (ch = 0; ch < ddata->chip.npwm; ch++) {
pwm = &ddata->chip.pwms[ch];
@@ -309,10 +309,10 @@ static int pwm_sifive_remove(struct platform_device *dev)
clk_disable(ddata->clk);
clk_disable_unprepare(ddata->clk);
- ret = pwmchip_remove(&ddata->chip);
+ pwmchip_remove(&ddata->chip);
clk_notifier_unregister(ddata->clk, &ddata->notifier);
- return ret;
+ return 0;
}
static const struct of_device_id pwm_sifive_of_match[] = {