]> www.infradead.org Git - users/dwmw2/linux.git/commit
clk: ti: Fix memleak in ti_fapll_synth_setup
authorZhang Qilong <zhangqilong3@huawei.com>
Fri, 13 Nov 2020 13:16:23 +0000 (21:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:47:03 +0000 (13:47 +0100)
commit36237bb655e9038c47974636e92ecc7b9835e090
treeb1e701269acd31049baab3d2414634a21c2b9d90
parent06995f950e2713ec4b428371030893aa638bb278
clk: ti: Fix memleak in ti_fapll_synth_setup

[ Upstream commit 8c6239f6e95f583bb763d0228e02d4dd0fb3d492 ]

If clk_register fails, we should goto free branch
before function returns to prevent memleak.

Fixes: 163152cbbe321 ("clk: ti: Add support for FAPLL on dm816x")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201113131623.2098222-1-zhangqilong3@huawei.com
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/ti/fapll.c