[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1392125141-14769-1-git-send-email-standby24x7@gmail.com>
Date: Tue, 11 Feb 2014 22:25:41 +0900
From: Masanari Iida <standby24x7@...il.com>
To: linux-kernel@...r.kernel.org, mturquette@...aro.org,
linux-arm-kernel@...ts.infradead.org
Cc: tony@...mide.com, t-kristo@...com,
Masanari Iida <standby24x7@...il.com>
Subject: [PATCH] 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.
Signed-off-by: Masanari Iida <standby24x7@...il.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
--
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