From: Sudip Mukherjee Date: Mon, 16 Nov 2015 13:46:40 +0000 (+0530) Subject: clk: versatile: fix memory leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=47c5ee34d8d913a1ab1ae87544475c136ea25b26;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git clk: versatile: fix memory leak If of_clk_parent_fill() fails then we printed an error message and returned. But we missed freeing sp810. Signed-off-by: Sudip Mukherjee Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c index a1cdef6b0f90..6a36c8bcb5de 100644 --- a/drivers/clk/versatile/clk-sp810.c +++ b/drivers/clk/versatile/clk-sp810.c @@ -102,6 +102,7 @@ static void __init clk_sp810_of_setup(struct device_node *node) if (of_clk_parent_fill(node, parent_names, num) != num) { pr_warn("Failed to obtain parent clocks for SP810!\n"); + kfree(sp810); return; }