From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
Linus Walleij <linusw@kernel.org>
Subject: Re: [PATCH] regulator: arizona-ldo1: Fix double gpiod_put() on enable GPIO
Date: Thu, 5 Nov 2026 10:02:00 +0000 [thread overview]
Message-ID: <auxUGE+zPcnAR49k@opensource.cirrus.com> (raw)
In-Reply-To: <20261104-arizona-ldo1-gpiod-fix-v1-1-5b3c02d8a4d0@gmail.com>
On Wed, Nov 04, 2026 at 10:38:32PM -0800, Dmitry Torokhov wrote:
> When arizona-ldo1 registers the regulator, the regulator core takes
> ownership of the GPIO descriptor passed in regulator_config.ena_gpiod.
> The core frees this enable GPIO descriptor both on registration error
> and when the regulator device is unregistered.
>
> Because the driver also tracked the descriptor and called gpiod_put()
> in its driver remove callback, unbinding the driver causes a duplicate
> gpiod_put(). Remove the driver remove callback and stop storing the
> enable GPIO descriptor in driver private data to avoid the double
> free.
>
> Fixes: a9191579ba10 ("regulator: arizona-ldo1: Use correct device to get enable GPIO")
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
next prev parent reply other threads:[~2026-11-05 10:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 6:38 [PATCH] regulator: arizona-ldo1: Fix double gpiod_put() on enable GPIO Dmitry Torokhov
2026-11-05 10:02 ` Charles Keepax [this message]
2026-11-05 10:08 ` Charles Keepax
2026-11-05 16:41 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=auxUGE+zPcnAR49k@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.