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

From: Linus Walleij
Date: Thu Nov 22 2018 - 09:20:01 EST


On Wed, Nov 21, 2018 at 11:13 AM Charles Keepax
<ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote:

> The regulator core takes over managing the lifetime of the enable GPIO
> once the regulator is registered. As such we shouldn't register the
> enable GPIO using devm, or it will be freed twice.
>
> Reported-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Thanks for fixing everything I break, I owe you big time Charles!

Now as Marek points out, I need to discern the pattern in this so
I can see if I broke something else the same way.

Yours,
Linus Walleij