From: Markus Elfring Date: Mon, 20 Jul 2020 14:19:06 +0000 Subject: Re: [PATCH] clk: ti: clkctrl: add the missed kfree() for _ti_omap4_clkctrl_setup() Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Jing Xiangfeng , linux-clk@vger.kernel.org, linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Michael Turquette , Rob Herring , Stephen Boyd , Tero Kristo , Tony Lindgren … > +++ b/drivers/clk/ti/clkctrl.c > @@ -655,8 +655,10 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) > } > > hw = kzalloc(sizeof(*hw), GFP_KERNEL); > - if (!hw) > + if (!hw) { > + kfree(clkctrl_name); > return; > + } … I suggest to use an additional label instead. if (!hw) - return; + goto free_control_name; By the way: How do you think about to replace the label “cleanup” by other jump targets for better exception handling in this function implementation? Regards, Markus