summaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2014-09-12 16:39:07 +0300
committerTero Kristo <t-kristo@ti.com>2014-09-29 11:51:13 +0300
commit73b5d5f711f35617ff701bd88e887d3a1187e82b (patch)
treea6161f53bb92fab12c79c9faaa96cb1bcba4e4e6 /drivers/clk
parentc08ee14cc6634457948bc5e26584697208baa02a (diff)
downloadop-kernel-dev-73b5d5f711f35617ff701bd88e887d3a1187e82b.zip
op-kernel-dev-73b5d5f711f35617ff701bd88e887d3a1187e82b.tar.gz
clk: ti: dra7-atl-clock: fix a memory leak
of_clk_add_provider makes an internal copy of the parent_names property while its called, thus it is no longer needed after this call and can be freed. Signed-off-by: Tero Kristo <t-kristo@ti.com> Cc: Mike Turquette <mturquette@linaro.org> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/ti/clk-dra7-atl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
index 4a65b41..3f9308a 100644
--- a/drivers/clk/ti/clk-dra7-atl.c
+++ b/drivers/clk/ti/clk-dra7-atl.c
@@ -199,6 +199,7 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
if (!IS_ERR(clk)) {
of_clk_add_provider(node, of_clk_src_simple_get, clk);
+ kfree(parent_names);
return;
}
cleanup:
OpenPOWER on IntegriCloud