public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: xgene: Fix mapping leak in xgene_pllclk_init()
@ 2026-03-05 10:11 Geert Uytterhoeven
  2026-03-09 15:09 ` Brian Masney
  2026-03-24  0:19 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2026-03-05 10:11 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Khuong Dinh
  Cc: linux-clk, linux-kernel, Geert Uytterhoeven

If xgene_register_clk_pll() fails, the mapped register block is never
unmapped.

Fixes: 308964caeebc45eb ("clk: Add APM X-Gene SoC clock driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/clk-xgene.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c
index ba3b1057e4f0c61d..abb6c8fcdc91fad3 100644
--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -188,6 +188,8 @@ static void xgene_pllclk_init(struct device_node *np, enum xgene_pll_type pll_ty
 		of_clk_add_provider(np, of_clk_src_simple_get, clk);
 		clk_register_clkdev(clk, clk_name, NULL);
 		pr_debug("Add %s clock PLL\n", clk_name);
+	} else {
+		iounmap(reg);
 	}
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: xgene: Fix mapping leak in xgene_pllclk_init()
  2026-03-05 10:11 [PATCH] clk: xgene: Fix mapping leak in xgene_pllclk_init() Geert Uytterhoeven
@ 2026-03-09 15:09 ` Brian Masney
  2026-03-24  0:19 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Masney @ 2026-03-09 15:09 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Michael Turquette, Stephen Boyd, Khuong Dinh, linux-clk,
	linux-kernel

On Thu, Mar 05, 2026 at 11:11:16AM +0100, Geert Uytterhoeven wrote:
> If xgene_register_clk_pll() fails, the mapped register block is never
> unmapped.
> 
> Fixes: 308964caeebc45eb ("clk: Add APM X-Gene SoC clock driver")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Brian Masney <bmasney@redhat.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: xgene: Fix mapping leak in xgene_pllclk_init()
  2026-03-05 10:11 [PATCH] clk: xgene: Fix mapping leak in xgene_pllclk_init() Geert Uytterhoeven
  2026-03-09 15:09 ` Brian Masney
@ 2026-03-24  0:19 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2026-03-24  0:19 UTC (permalink / raw)
  To: Geert Uytterhoeven, Khuong Dinh, Michael Turquette
  Cc: linux-clk, linux-kernel, Geert Uytterhoeven

Quoting Geert Uytterhoeven (2026-03-05 02:11:16)
> If xgene_register_clk_pll() fails, the mapped register block is never
> unmapped.
> 
> Fixes: 308964caeebc45eb ("clk: Add APM X-Gene SoC clock driver")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-24  0:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 10:11 [PATCH] clk: xgene: Fix mapping leak in xgene_pllclk_init() Geert Uytterhoeven
2026-03-09 15:09 ` Brian Masney
2026-03-24  0:19 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox