Messages in this thread | | | Date | Tue, 11 Jun 2019 17:25:33 +0200 | From | Uwe Kleine-König <> | Subject | Re: [PATCH v13 2/2] pwm: sifive: Add a driver for SiFive SoC PWM |
| |
Hello,
On Tue, Jun 11, 2019 at 11:14:44AM +0530, Yash Shah wrote: > [...] > +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; > + > + for (ch = 0; ch < ddata->chip.npwm; ch++) { > + pwm = &ddata->chip.pwms[ch]; > + if (pwm->state.enabled) { > + is_enabled = true; > + break; > + } > + } > + if (is_enabled) > + clk_disable(ddata->clk); > + > + clk_disable_unprepare(ddata->clk); > + ret = pwmchip_remove(&ddata->chip); > + clk_notifier_unregister(ddata->clk, &ddata->notifier); > + > + return ret;
I think the return value of a platform driver's remove callback is ignored. So usually you should return 0.
Not sure this is worth addressing in a new round, so if noone else has something to criticise that justifies a new round, take my
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> +}
Best regards Uwe
-- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
| |