DORMANTno replies

[PATCH] clk:ti: Fix memory leak in of_ti_composite_divider_clk_setup()

From: Masanari Iida <hidden>
Date: 2014-02-11 13:25:53
Also in: lkml
Subsystem: common clk framework, the rest, ti clock driver · Maintainers: Michael Turquette, Stephen Boyd, Linus Torvalds, Tero Kristo

cppcheck detected following error
[drivers/clk/ti/divider.c:480]: (error) Memory leak: div

The original code forgot to free div and just returned.

Signed-off-by: Masanari Iida <redacted>
---
 drivers/clk/ti/divider.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/clk/ti/divider.c b/drivers/clk/ti/divider.c
index a15e445..a105d94 100644
--- a/drivers/clk/ti/divider.c
+++ b/drivers/clk/ti/divider.c
@@ -477,7 +477,6 @@ static void __init of_ti_composite_divider_clk_setup(struct device_node *node)
 		goto cleanup;
 
 	if (!ti_clk_add_component(node, &div->hw, CLK_COMPONENT_TYPE_DIVIDER))
-		return;
 
 cleanup:
 	kfree(div->table);
-- 
1.9.rc1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help