]> git.baikalelectronics.ru Git - kernel.git/commit
clk: st: Fix memory leak in st_of_quadfs_setup()
authorXiu Jianfeng <xiujianfeng@huawei.com>
Tue, 22 Nov 2022 13:36:14 +0000 (21:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:38 +0000 (11:41 +0100)
commit1ed2a2a435eb0c4a6e2d2c96bc9356b28c9416c2
tree9fef841f23afa690c5e76545e159c37402073f54
parent3ccfc56492598358103e691f8a33e0ec85863610
clk: st: Fix memory leak in st_of_quadfs_setup()

[ Upstream commit bcc1aa64c8e662a3cea0c473975444af199cdfcf ]

If st_clk_register_quadfs_pll() fails, @lock should be freed before goto
@err_exit, otherwise will cause meory leak issue, fix it.

Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Link: https://lore.kernel.org/r/20221122133614.184910-1-xiujianfeng@huawei.com
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/st/clkgen-fsyn.c