Re: [PATCH v2] regulator: wm8994: Don't use devres for enable GPIOs

From: Charles Keepax
Date: Wed Nov 21 2018 - 06:00:07 EST


On Wed, Nov 21, 2018 at 11:42:06AM +0100, Marek Szyprowski wrote:
> On 2018-11-21 11:13, Charles Keepax wrote:
> Linus, Mark: Similar issue is probably in the other regulator drivers,
> which use enable GPIO allocated by devm_gpio_get*(). This driver is
> simply the first one, which we observed it. It would be great if one
> would take a look into regulator_register() error path, because for some
> cases the GPIO will be freed, for the other - not.
>

Yeah I have managed to reproduce the issue on another on of our
boards now, so it definitely affects other drivers we have. Its a
bit sneaky since the GPIO core only seems to warn on the additional
free if you have some additional debug turned on which masks the
issue most of the time.

I will have a bit of a look and see what else might be affected.

Thanks,
Charles