[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1447681600-14120-1-git-send-email-sudipm.mukherjee@gmail.com>
Date: Mon, 16 Nov 2015 19:16:40 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...eaurora.org>
Cc: linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH] clk: versatile: fix memory leak
If of_clk_parent_fill() fails then we printed an error message and
returned. But we missed freeing sp810.
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---
drivers/clk/versatile/clk-sp810.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c
index a1cdef6..6a36c8b 100644
--- a/drivers/clk/versatile/clk-sp810.c
+++ b/drivers/clk/versatile/clk-sp810.c
@@ -102,6 +102,7 @@ static void __init clk_sp810_of_setup(struct device_node *node)
if (of_clk_parent_fill(node, parent_names, num) != num) {
pr_warn("Failed to obtain parent clocks for SP810!\n");
+ kfree(sp810);
return;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists