FAILED: patch "[PATCH] pmdomain: imx: Fix reference count leak in imx_gpc_remove" failed to apply to 5.4-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y
git checkout FETCH_HEAD
git cherry-pick -x bbde14682eba21d86f5f3d6fe2d371b1f97f1e61
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025112011-seltzer-flock-722f@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From bbde14682eba21d86f5f3d6fe2d371b1f97f1e61 Mon Sep 17 00:00:00 2001
From: Miaoqian Lin <[email protected]>
Date: Tue, 28 Oct 2025 11:16:20 +0800
Subject: [PATCH] pmdomain: imx: Fix reference count leak in imx_gpc_remove
of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not needed anymore. Add the missing of_node_put() to avoid refcount leak.
drivers/pmdomain/imx/gpc.c +2 -0
@@ -536,6 +536,8 @@ static void imx_gpc_remove(struct platform_device *pdev)return ; } } + +of_node_put (pgc_node); }static struct platform_driver imx_gpc_driver = {
Sasha Levin
maintainerPATCH 1/1 pmdomain: imx: Fix reference count leak in imx_gpc_remove
From: Miaoqian Lin <[email protected]>
[ Upstream commit bbde14682eba21d86f5f3d6fe2d371b1f97f1e61 ]
of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not needed anymore. Add the missing of_node_put() to avoid refcount leak.
--- drivers/soc/imx/gpc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/soc/imx/gpc.c +2 -0
@@ -540,6 +540,8 @@ static int imx_gpc_remove(struct platform_device *pdev)return ret; } +of_node_put (pgc_node); +return 0 ; }
Signature · 1 line
2.51.0