lkml.org 
[lkml]   [2019]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/ |

\
 
 \ /
  Last update: 2019-06-11 17:25    [W:0.046 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site