From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: Ulf Hansson <ulfh@kernel.org>
Cc: "Lucas Stach" <l.stach@pengutronix.de>,
linux-amarula@amarulasolutions.com, michael@amarulasolutions.com,
"Peng Fan" <peng.fan@nxp.com>,
"Dario Binacchi" <dario.binacchi@amarulasolutions.com>,
Sashiko <sashiko-bot@kernel.org>,
"Fabio Estevam" <festevam@gmail.com>,
"Frank Li" <Frank.Li@nxp.com>,
"Kees Cook" <kees+treewide@kernel.org>,
"Marek Vasut" <marex@denx.de>,
"Ming Qian" <ming.qian@oss.nxp.com>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Shawn Guo" <shawnguo@kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"bui duc phuc" <phucduc.bui@gmail.com>,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-pm@vger.kernel.org
Subject: [PATCH v4 1/4] pmdomain: imx8m-blk-ctrl: Remove the power notifier on probe failure
Date: Sun, 22 Nov 2026 21:51:10 +0100 [thread overview]
Message-ID: <20261122205136.138173-2-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20261122205136.138173-1-dario.binacchi@amarulasolutions.com>
If devm_of_platform_populate() fails, the probe returns leaving the
power notifier registered on the bus power domain, while the memory
holding it is released. Remove it.
Fixes: 9cb6d1b39a8f ("soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/r/sashiko-outbox-227073@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
(no changes since v3)
Changes in v3:
- Add Reported-by and Closes tags
Changes in v2:
- New patch
drivers/pmdomain/imx/imx8m-blk-ctrl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pmdomain/imx/imx8m-blk-ctrl.c b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
index 9df933a7a238..7d6735728d8c 100644
--- a/drivers/pmdomain/imx/imx8m-blk-ctrl.c
+++ b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
@@ -345,10 +345,12 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
ret = devm_of_platform_populate(dev);
if (ret)
- goto cleanup_provider;
+ goto cleanup_notifier;
return 0;
+cleanup_notifier:
+ dev_pm_genpd_remove_notifier(bc->bus_power_dev);
cleanup_provider:
of_genpd_del_provider(dev->of_node);
cleanup_pds:
--
2.43.0
next prev parent reply other threads:[~2026-11-22 20:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 20:51 [PATCH v4 0/4] pmdomain: imx: Keep the domains left on by the bootloader Dario Binacchi
2026-11-22 20:51 ` Dario Binacchi [this message]
2026-11-22 20:51 ` [PATCH v4 2/4] pmdomain: imx: gpcv2: " Dario Binacchi
2026-11-22 20:51 ` [PATCH v4 3/4] pmdomain: imx8m-blk-ctrl: " Dario Binacchi
2026-11-22 20:51 ` [PATCH v4 4/4] pmdomain: imx8m-blk-ctrl: Hold boot-on domain clocks until sync_state Dario Binacchi
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=20261122205136.138173-2-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=Frank.Li@nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kees+treewide@kernel.org \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=marex@denx.de \
--cc=michael@amarulasolutions.com \
--cc=ming.qian@oss.nxp.com \
--cc=peng.fan@nxp.com \
--cc=phucduc.bui@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=sashiko-bot@kernel.org \
--cc=shawnguo@kernel.org \
--cc=u.kleine-koenig@baylibre.com \
--cc=ulfh@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox