Skip to contentSkip to conversation

clk:ti: Fix memory leak in of_ti_composite_divider_clk_setup()

PATCH New Masanari Iida 1 participant 1 message Feb 11, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk:ti: Fix memory leak in of_ti_composite_divider_clk_setup()

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

The original code forgot to free div and just returned.

---
 drivers/clk/ti/divider.c | 1 -
 1 file changed, 1 deletion(-)
drivers/clk/ti/divider.c +0 -1
index a15e445..a105d94 100644
@@ -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);
Signature · 1 line
1.9.rc1