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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Sep 2013 11:50:17 +0530
From:	Sachin Kamat <sachin.kamat@...aro.org>
To:	Jingoo Han <jg1.han@...sung.com>
Cc:	Mark Brown <broonie@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 06/18] regulator: gpio-regulator: use devm_regulator_register()

On 26 September 2013 07:36, Jingoo Han <jg1.han@...sung.com> wrote:
> Use devm_regulator_register() to make cleanup paths simpler.
> @@ -349,8 +350,6 @@ static int gpio_regulator_remove(struct platform_device *pdev)
>  {
>         struct gpio_regulator_data *drvdata = platform_get_drvdata(pdev);
>
> -       regulator_unregister(drvdata->dev);
> -
>         gpio_free_array(drvdata->gpios, drvdata->nr_gpios);
>
>         kfree(drvdata->states);

In most of the cases where unregister doesn't happen to be the only or
last call in the remove path,
I am not sure if change in ordering wouldn't cause any functional
issues. For. e.g., in this patch we are freeing the gpios and the
driver states even before unregistering the device which is logically
not right.

-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ