* [PATCH] bus: ti-sysc: Adjust exception handling in sysc_child_add_named_clock()
@ 2019-11-06 18:22 Markus Elfring
2019-11-14 17:07 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2019-11-06 18:22 UTC (permalink / raw)
To: linux-omap, Tony Lindgren; +Cc: LKML, kernel-janitors, Tero Kristo
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Nov 2019 19:12:30 +0100
Add a jump target so that a call of the function “clk_put”
can be better reused at the end of this function.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/bus/ti-sysc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 97b85493aa43..2042f6e45163 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1766,9 +1766,8 @@ static int sysc_child_add_named_clock(struct sysc *ddata,
clk = clk_get(child, name);
if (!IS_ERR(clk)) {
- clk_put(clk);
-
- return -EEXIST;
+ error = -EEXIST;
+ goto put_clk;
}
clk = clk_get(ddata->dev, name);
@@ -1778,7 +1777,7 @@ static int sysc_child_add_named_clock(struct sysc *ddata,
l = clkdev_create(clk, name, dev_name(child));
if (!l)
error = -ENOMEM;
-
+put_clk:
clk_put(clk);
return error;
--
2.24.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bus: ti-sysc: Adjust exception handling in sysc_child_add_named_clock()
2019-11-06 18:22 [PATCH] bus: ti-sysc: Adjust exception handling in sysc_child_add_named_clock() Markus Elfring
@ 2019-11-14 17:07 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2019-11-14 17:07 UTC (permalink / raw)
To: Markus Elfring; +Cc: linux-omap, LKML, kernel-janitors, Tero Kristo
* Markus Elfring <Markus.Elfring@web.de> [191106 10:22]:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 6 Nov 2019 19:12:30 +0100
>
> Add a jump target so that a call of the function “clk_put”
> can be better reused at the end of this function.
Thanks applying into omap-for-v5.5/ti-sysc.
Regards,
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-14 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 18:22 [PATCH] bus: ti-sysc: Adjust exception handling in sysc_child_add_named_clock() Markus Elfring
2019-11-14 17:07 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).