Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Uwe Kleine-König and committed by
Thierry Reding
ceb2c284 4e334973

+3 -3
+3 -3
drivers/pwm/pwm-sifive.c
··· 291 291 struct pwm_sifive_ddata *ddata = platform_get_drvdata(dev); 292 292 bool is_enabled = false; 293 293 struct pwm_device *pwm; 294 - int ret, ch; 294 + int ch; 295 295 296 296 for (ch = 0; ch < ddata->chip.npwm; ch++) { 297 297 pwm = &ddata->chip.pwms[ch]; ··· 304 304 clk_disable(ddata->clk); 305 305 306 306 clk_disable_unprepare(ddata->clk); 307 - ret = pwmchip_remove(&ddata->chip); 307 + pwmchip_remove(&ddata->chip); 308 308 clk_notifier_unregister(ddata->clk, &ddata->notifier); 309 309 310 - return ret; 310 + return 0; 311 311 } 312 312 313 313 static const struct of_device_id pwm_sifive_of_match[] = {