lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190611152533.satxxae7dfrovgny@pengutronix.de>
Date:   Tue, 11 Jun 2019 17:25:33 +0200
From:   Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
To:     Yash Shah <yash.shah@...ive.com>
Cc:     thierry.reding@...il.com, linux-pwm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-riscv@...ts.infradead.org,
        linux-kernel@...r.kernel.org, robh+dt@...nel.org,
        mark.rutland@....com, palmer@...ive.com, paul.walmsley@...ive.com,
        aou@...s.berkeley.edu, sachin.ghadi@...ive.com
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@...gutronix.de>

> +}

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ