[PATCH v4 1/4] pmdomain: imx8m-blk-ctrl: Remove the power notifier on probe failure

Frank Li Frank.li at oss.nxp.com
Mon Nov 23 09:42:59 PST 2026


On Sun, Nov 22, 2026 at 09:51:10PM +0100, Dario Binacchi wrote:
> 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 at kernel.org>
> Closes: https://lore.kernel.org/r/sashiko-outbox-227073@kernel.org
> Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
>
> ---

Reviewed-by: Frank Li <Frank.Li at nxp.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
>
>



More information about the linux-arm-kernel mailing list