FAILED: Patch "clk: tegra: tegra124-emc: Fix potential memory leak in tegra124_clk_register_emc()" failed to apply to 6.6-stable tree
Subsystems (4)
Sasha Levin
maintainerThe patch below does not apply to the 6.6-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]>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From fce0d0bd9c20fefd180ea9e8362d619182f97a1d Mon Sep 17 00:00:00 2001
From: Haoxiang Li <[email protected]>
Date: Thu, 15 Jan 2026 13:05:42 +0800
Subject: [PATCH] clk: tegra: tegra124-emc: Fix potential memory leak in
tegra124_clk_register_emc()
If clk_register() fails, call kfree to release "tegra".
Fixes 2db04f16b589 ("clk: tegra: Add EMC clock driver")
Signed-off-by Haoxiang Li <[email protected]>
Reviewed-by Brian Masney <[email protected]>
Signed-off-by Thierry Reding <[email protected]>
--- drivers/clk/tegra/clk-tegra124-emc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/tegra/clk-tegra124-emc.c +3 -1
@@ -538,8 +538,10 @@ struct clk *tegra124_clk_register_emc(void __iomem *base, struct device_node *np tegra->hw.init = &init; clk =clk_register (NULL , &tegra->hw); -if (IS_ERR (clk)) +if (IS_ERR (clk)) { +kfree (tegra);return clk; + } tegra->prev_parent =clk_hw_get_parent_by_index ( &tegra->hw,emc_get_parent (&tegra->hw))->clk;
Signature · 1 line
2.51.0