lkml.org 
[lkml]   [2013]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/6] regulator: gpio-regulator: use devm_regulator_register()
Date
Hi,

Am Freitag, 6. Dezember 2013, 08:10:42 schrieb Jingoo Han:

> @@ -351,8 +352,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);

I'm not this firm in the core driver/device behaviour, but when looking at
__device_release_driver I see that the remove callback runs before
devres_release_all, which would effectively free the gpios before the
regulator gets unregistered - is this racy with a regulator change at the same
time?


Heiko


\
 
 \ /
  Last update: 2013-12-06 11:21    [W:0.139 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site