]> www.infradead.org Git - users/jedix/linux-maple.git/commit
clk: socfpga: Fix memory leak in socfpga_gate_init()
authorXiu Jianfeng <xiujianfeng@huawei.com>
Wed, 23 Nov 2022 03:16:22 +0000 (11:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:26 +0000 (13:32 +0100)
commitbd72ab5e6fc1c4d3e6b84636141d26a41b977b03
treed28822f3182a0c1411c2ae39cb4854dce42bf6ae
parent8d64aca5e8f36cf71338846a4bb87efd54386ac7
clk: socfpga: Fix memory leak in socfpga_gate_init()

[ Upstream commit 0b8ba891ad4d1ef6bfa4c72efc83f9f9f855f68b ]

Free @socfpga_clk and @ops on the error path to avoid memory leak issue.

Fixes: a30a67be7b6e ("clk: socfpga: Don't have get_parent for single parent ops")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Link: https://lore.kernel.org/r/20221123031622.63171-1-xiujianfeng@huawei.com
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/socfpga/clk-gate.c