Skip to contentSkip to conversation

FAILED: patch "[PATCH] pmdomain: rockchip: fix clock leak on domain probe failure" failed to apply to 5.15-stable tree

PATCH New [email protected] 2 participants 2 messages Oct 12 – Oct 13

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.15-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.15.y
git checkout FETCH_HEAD
git cherry-pick -x d8b3847770661b7109146e6479eeadcdab9cecf0
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026101258-outdoors-settle-2eb1@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From d8b3847770661b7109146e6479eeadcdab9cecf0 Mon Sep 17 00:00:00 2001
From: Shawn Lin <[email protected]>
Date: Mon, 21 Sep 2026 14:52:51 +0800
Subject: [PATCH] pmdomain: rockchip: fix clock leak on domain probe failure

When of_clk_get() failed in the middle of the loop, the references of the clocks acquired so far were leaked instead of being released by the error path.

Fixes d909072d0521 ("soc: rockchip: power-domain: use clk_bulk APIs")
drivers/pmdomain/rockchip/pm-domains.c +1 -1
index 068dd4b3705e..b6b099b9ed5c 100644
@@ -842,7 +842,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 			dev_err(pmu->dev,
 				"%pOFn: failed to get clk at index %d: %d\n",
 				node, i, error);
-			return error;
+			goto err_put_clocks;
 		}
 	}
 
maintainer
#1 lore raw

PATCH 1/1 pmdomain: rockchip: fix clock leak on domain probe failure

From: Shawn Lin <[email protected]>

[ Upstream commit d8b3847770661b7109146e6479eeadcdab9cecf0 ]

When of_clk_get() failed in the middle of the loop, the references of the clocks acquired so far were leaked instead of being released by the error path.

Fixes d909072d0521 ("soc: rockchip: power-domain: use clk_bulk APIs")
---
 drivers/soc/rockchip/pm_domains.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/rockchip/pm_domains.c +1 -1
index 0868b7d406fba..67f78378d7f13 100644
@@ -443,7 +443,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 			dev_err(pmu->dev,
 				"%pOFn: failed to get clk at index %d: %d\n",
 				node, i, error);
-			return error;
+			goto err_put_clocks;
 		}
 	}
 
Signature · 1 line
2.53.0