diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2016-11-24 11:10:13 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-11-28 11:29:04 -0500 |
commit | 9c6bafab03dec222237b6eb8b5adf5c18ec76264 (patch) | |
tree | 1ebe5e806dfb7eb3c75895417e1debaa1bd7836a | |
parent | c8b877a5e58a132c5efb05f0c404585b9789fe5c (diff) |
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@linux.vnet.ibm.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-s390@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: rt@linutronix.de
Cc: "David S. Miller" <davem@davemloft.net>
Link: http://lkml.kernel.org/r/20161124161013.dukr42y2nwscosk6@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | net/iucv/iucv.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index f0d6afc5d4a9..8f7ef167c45a 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
@@ -2038,16 +2038,16 @@ static int __init iucv_init(void) | |||
2038 | rc = cpuhp_setup_state(CPUHP_NET_IUCV_PREPARE, "net/iucv:prepare", | 2038 | rc = cpuhp_setup_state(CPUHP_NET_IUCV_PREPARE, "net/iucv:prepare", |
2039 | iucv_cpu_prepare, iucv_cpu_dead); | 2039 | iucv_cpu_prepare, iucv_cpu_dead); |
2040 | if (rc) | 2040 | if (rc) |
2041 | goto out_free; | 2041 | goto out_dev; |
2042 | rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "net/iucv:online", | 2042 | rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "net/iucv:online", |
2043 | iucv_cpu_online, iucv_cpu_down_prep); | 2043 | iucv_cpu_online, iucv_cpu_down_prep); |
2044 | if (rc < 0) | 2044 | if (rc < 0) |
2045 | goto out_free; | 2045 | goto out_prep; |
2046 | iucv_online = rc; | 2046 | iucv_online = rc; |
2047 | 2047 | ||
2048 | rc = register_reboot_notifier(&iucv_reboot_notifier); | 2048 | rc = register_reboot_notifier(&iucv_reboot_notifier); |
2049 | if (rc) | 2049 | if (rc) |
2050 | goto out_free; | 2050 | goto out_remove_hp; |
2051 | ASCEBC(iucv_error_no_listener, 16); | 2051 | ASCEBC(iucv_error_no_listener, 16); |
2052 | ASCEBC(iucv_error_no_memory, 16); | 2052 | ASCEBC(iucv_error_no_memory, 16); |
2053 | ASCEBC(iucv_error_pathid, 16); | 2053 | ASCEBC(iucv_error_pathid, 16); |
@@ -2061,11 +2061,11 @@ static int __init iucv_init(void) | |||
2061 | 2061 | ||
2062 | out_reboot: | 2062 | out_reboot: |
2063 | unregister_reboot_notifier(&iucv_reboot_notifier); | 2063 | unregister_reboot_notifier(&iucv_reboot_notifier); |
2064 | out_free: | 2064 | out_remove_hp: |
2065 | if (iucv_online) | 2065 | cpuhp_remove_state(iucv_online); |
2066 | cpuhp_remove_state(iucv_online); | 2066 | out_prep: |
2067 | cpuhp_remove_state(CPUHP_NET_IUCV_PREPARE); | 2067 | cpuhp_remove_state(CPUHP_NET_IUCV_PREPARE); |
2068 | 2068 | out_dev: | |
2069 | root_device_unregister(iucv_root); | 2069 | root_device_unregister(iucv_root); |
2070 | out_int: | 2070 | out_int: |
2071 | unregister_external_irq(EXT_IRQ_IUCV, iucv_external_interrupt); | 2071 | unregister_external_irq(EXT_IRQ_IUCV, iucv_external_interrupt); |