]> git.baikalelectronics.ru Git - kernel.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>
Wed, 18 Jan 2023 10:41:13 +0000 (11:41 +0100)
commit170edf32dbc82b4569b6f737260d276b929569f0
treefbe2cfac45db0eda8e79b06e7ea50f4964a6b35d
parentdb7c668e0d75267e9ac9135510a169a094ffc27c
clk: socfpga: Fix memory leak in socfpga_gate_init()

[ Upstream commit 390784ded6c3ff72061afe3e9a7e967994968f97 ]

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

Fixes: 4bbbff99cb26 ("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