Linux-OMAP Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] clk: ti: clkctrl: fix the missed kfree() for _ti_omap4_clkctrl_setup()
@ 2020-07-28  6:18 Jing Xiangfeng
  0 siblings, 0 replies; only message in thread
From: Jing Xiangfeng @ 2020-07-28  6:18 UTC (permalink / raw)
  To: t-kristo, mturquette, sboyd, tony, robh
  Cc: linux-omap, linux-clk, linux-kernel, jingxiangfeng

_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@huawei.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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  6:18 [PATCH v2] clk: ti: clkctrl: fix the missed kfree() for _ti_omap4_clkctrl_setup() Jing Xiangfeng

Linux-OMAP Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-omap/0 linux-omap/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-omap linux-omap/ https://lore.kernel.org/linux-omap \
		linux-omap@vger.kernel.org
	public-inbox-index linux-omap

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-omap


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git