[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-9c6bafab03dec222237b6eb8b5adf5c18ec76264@git.kernel.org>
Date: Mon, 28 Nov 2016 08:37:17 -0800
From: tip-bot for Sebastian Andrzej Siewior <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
ubraun@...ux.vnet.ibm.com, hpa@...or.com, davem@...emloft.net,
bigeasy@...utronix.de, mingo@...nel.org
Subject: [tip:smp/hotplug] net/iucv: Use explicit clean up labels in
iucv_init()
Commit-ID: 9c6bafab03dec222237b6eb8b5adf5c18ec76264
Gitweb: http://git.kernel.org/tip/9c6bafab03dec222237b6eb8b5adf5c18ec76264
Author: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
AuthorDate: Thu, 24 Nov 2016 17:10:13 +0100
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Mon, 28 Nov 2016 17:29:04 +0100
net/iucv: Use explicit clean up labels in iucv_init()
Ursula suggested to use explicit labels for clean up in the error path
instead of one `out_free' label, which handles multiple exits, introduced
in commit 38b482929e8f ("net/iucv: Convert to hotplug state machine").
Suggested-by: Ursula Braun <ubraun@...ux.vnet.ibm.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-s390@...r.kernel.org
Cc: netdev@...r.kernel.org
Cc: rt@...utronix.de
Cc: "David S. Miller" <davem@...emloft.net>
Link: http://lkml.kernel.org/r/20161124161013.dukr42y2nwscosk6@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
net/iucv/iucv.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index f0d6afc..8f7ef16 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -2038,16 +2038,16 @@ static int __init iucv_init(void)
rc = cpuhp_setup_state(CPUHP_NET_IUCV_PREPARE, "net/iucv:prepare",
iucv_cpu_prepare, iucv_cpu_dead);
if (rc)
- goto out_free;
+ goto out_dev;
rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "net/iucv:online",
iucv_cpu_online, iucv_cpu_down_prep);
if (rc < 0)
- goto out_free;
+ goto out_prep;
iucv_online = rc;
rc = register_reboot_notifier(&iucv_reboot_notifier);
if (rc)
- goto out_free;
+ goto out_remove_hp;
ASCEBC(iucv_error_no_listener, 16);
ASCEBC(iucv_error_no_memory, 16);
ASCEBC(iucv_error_pathid, 16);
@@ -2061,11 +2061,11 @@ static int __init iucv_init(void)
out_reboot:
unregister_reboot_notifier(&iucv_reboot_notifier);
-out_free:
- if (iucv_online)
- cpuhp_remove_state(iucv_online);
+out_remove_hp:
+ cpuhp_remove_state(iucv_online);
+out_prep:
cpuhp_remove_state(CPUHP_NET_IUCV_PREPARE);
-
+out_dev:
root_device_unregister(iucv_root);
out_int:
unregister_external_irq(EXT_IRQ_IUCV, iucv_external_interrupt);
Powered by blists - more mailing lists