All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: samsung: exynos5410: fix refcount leak
@ 2026-05-26  6:13 Alexander A. Klimov
  2026-05-26  6:13 ` [PATCH] clk: tegra: tegra124-emc: fix krealloc() memory leak Alexander A. Klimov
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Alexander A. Klimov @ 2026-05-26  6:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Alim Akhtar, Michael Turquette, Stephen Boyd, Brian Masney,
	open list:SAMSUNG SOC CLOCK DRIVERS,
	open list:COMMON CLK FRAMEWORK,
	moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES,
	open list
  Cc: Alexander A. Klimov

Every value returned from of_clk_get() is supposed to be cleaned up
via clk_put() once not needed anymore.

Fixes: be95d2c7d918 ("clk: samsung: Add support for EPLL on exynos5410")
Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
---
 drivers/clk/samsung/clk-exynos5410.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5410.c b/drivers/clk/samsung/clk-exynos5410.c
index baa9988c7bb7..0cd9b0392cf5 100644
--- a/drivers/clk/samsung/clk-exynos5410.c
+++ b/drivers/clk/samsung/clk-exynos5410.c
@@ -269,8 +269,12 @@ static void __init exynos5410_clk_init(struct device_node *np)
 {
 	struct clk *xxti = of_clk_get(np, 0);
 
-	if (!IS_ERR(xxti) && clk_get_rate(xxti) == 24 * MHZ)
-		exynos5410_plls[epll].rate_table = exynos5410_pll2550x_24mhz_tbl;
+	if (!IS_ERR(xxti)) {
+		if (clk_get_rate(xxti) == 24 * MHZ)
+			exynos5410_plls[epll].rate_table =
+				exynos5410_pll2550x_24mhz_tbl;
+		clk_put(xxti);
+	}
 
 	samsung_cmu_register_one(np, &cmu);
 
-- 
2.54.0


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

end of thread, other threads:[~2026-06-01 15:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26  6:13 [PATCH] clk: samsung: exynos5410: fix refcount leak Alexander A. Klimov
2026-05-26  6:13 ` [PATCH] clk: tegra: tegra124-emc: fix krealloc() memory leak Alexander A. Klimov
2026-05-26 17:33   ` Brian Masney
2026-05-28 20:30   ` Thierry Reding
2026-05-31 19:52     ` [PATCH v2] " Alexander A. Klimov
2026-05-26  6:13 ` [PATCH] dmaengine: ioatdma: use !kstrtoint(), not sscanf()!=-1 Alexander A. Klimov
2026-05-26  6:24   ` sashiko-bot
2026-05-26 14:49   ` Dave Jiang
2026-05-26 18:06     ` Alexander A. Klimov
2026-05-28 20:06       ` Dave Jiang
2026-05-31  8:56         ` Alexander A. Klimov
2026-06-01 15:12           ` Dave Jiang
2026-05-26  6:13 ` [PATCH] tlclk: if sscanf() fails, fall back to 0, not random value Alexander A. Klimov
2026-05-26 17:29 ` [PATCH] clk: samsung: exynos5410: fix refcount leak Brian Masney
2026-05-28  1:15 ` Alexey Klimov
2026-05-28  8:02 ` Peter Griffin
2026-05-30 16:26 ` Krzysztof Kozlowski
2026-05-31  9:27   ` Alexander A. Klimov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.