Skip to content

Commit ceb2c28

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: sifive: Don't check the return code of pwmchip_remove()
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 <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 4e33497 commit ceb2c28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/pwm/pwm-sifive.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static int pwm_sifive_remove(struct platform_device *dev)
291291
struct pwm_sifive_ddata *ddata = platform_get_drvdata(dev);
292292
bool is_enabled = false;
293293
struct pwm_device *pwm;
294-
int ret, ch;
294+
int ch;
295295

296296
for (ch = 0; ch < ddata->chip.npwm; ch++) {
297297
pwm = &ddata->chip.pwms[ch];
@@ -304,10 +304,10 @@ static int pwm_sifive_remove(struct platform_device *dev)
304304
clk_disable(ddata->clk);
305305

306306
clk_disable_unprepare(ddata->clk);
307-
ret = pwmchip_remove(&ddata->chip);
307+
pwmchip_remove(&ddata->chip);
308308
clk_notifier_unregister(ddata->clk, &ddata->notifier);
309309

310-
return ret;
310+
return 0;
311311
}
312312

313313
static const struct of_device_id pwm_sifive_of_match[] = {

0 commit comments

Comments
 (0)