linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk:ti: Fix memory leak in of_ti_composite_divider_clk_setup()
@ 2014-02-11 13:25 Masanari Iida
  0 siblings, 0 replies; only message in thread
From: Masanari Iida @ 2014-02-11 13:25 UTC (permalink / raw)
  To: linux-kernel, mturquette, linux-arm-kernel; +Cc: tony, t-kristo, Masanari Iida

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 <standby24x7@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-11 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11 13:25 [PATCH] clk:ti: Fix memory leak in of_ti_composite_divider_clk_setup() Masanari Iida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).