[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200728061846.68281-1-jingxiangfeng@huawei.com>
Date: Tue, 28 Jul 2020 14:18:46 +0800
From: Jing Xiangfeng <jingxiangfeng@...wei.com>
To: <t-kristo@...com>, <mturquette@...libre.com>, <sboyd@...nel.org>,
<tony@...mide.com>, <robh@...nel.org>
CC: <linux-omap@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <jingxiangfeng@...wei.com>
Subject: [PATCH v2] clk: ti: clkctrl: fix the missed kfree() for _ti_omap4_clkctrl_setup()
_ti_omap4_clkctrl_setup() misses to call kfree() in an error path. Jump
to cleanup to fix it.
Fixes: 6c3090520554 ("clk: ti: clkctrl: Fix hidden dependency to node name")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@...wei.com>
---
drivers/clk/ti/clkctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c
index 864c484bde1b..a562261eb061 100644
--- a/drivers/clk/ti/clkctrl.c
+++ b/drivers/clk/ti/clkctrl.c
@@ -656,7 +656,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
hw = kzalloc(sizeof(*hw), GFP_KERNEL);
if (!hw)
- return;
+ goto cleanup;
hw->enable_reg.ptr = provider->base + reg_data->offset;
--
2.17.1
Powered by blists - more mailing lists