[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <159195e8-a382-48ab-8159-0c473ec38ad2@web.de>
Date: Sun, 24 Dec 2023 17:40:08 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: linux-omap@...r.kernel.org, linux-clk@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
Michael Turquette <mturquette@...libre.com>, Rob Herring <robh@...nel.org>,
Stephen Boyd <sboyd@...nel.org>, Tero Kristo <kristo@...nel.org>,
Tony Lindgren <tony@...mide.com>
Cc: LKML <linux-kernel@...r.kernel.org>, cocci@...ia.fr
Subject: [PATCH 03/10] clk: ti: Use common code in omap_clk_register_apll()
From: Markus Elfring <elfring@...rs.sourceforge.net>
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@...rs.sourceforge.net>
---
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
Powered by blists - more mailing lists