From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Date: Sun, 24 Dec 2023 12:40:59 +0100 Use another label so that two function calls can be better reused at the end of this function. Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> --- drivers/clk/ti/apll.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c index d2be672521a3..406326883741 100644 --- a/drivers/clk/ti/apll.c +++ b/drivers/clk/ti/apll.c @@ -163,16 +163,15 @@ static void __init omap_clk_register_apll(void *user, clk = of_ti_clk_register_omap_hw(node, &clk_hw->hw, name); if (!IS_ERR(clk)) { of_clk_add_provider(node, of_clk_src_simple_get, clk); - kfree(init->parent_names); - kfree(init); - return; + goto free_names; } cleanup: kfree(clk_hw->dpll_data); + kfree(clk_hw); +free_names: kfree(init->parent_names); kfree(init); - kfree(clk_hw); } static void __init of_dra7_apll_setup(struct device_node *node) -- 2.43.0