Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966560AbcKXT6D (ORCPT ); Thu, 24 Nov 2016 14:58:03 -0500 Received: from terminus.zytor.com ([198.137.202.10]:46896 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966338AbcKXT6B (ORCPT ); Thu, 24 Nov 2016 14:58:01 -0500 Date: Thu, 24 Nov 2016 11:57:50 -0800 From: tip-bot for Sebastian Andrzej Siewior Message-ID: Cc: hpa@zytor.com, ubraun@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, bigeasy@linutronix.de, davem@davemloft.net Reply-To: ubraun@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, hpa@zytor.com, bigeasy@linutronix.de, davem@davemloft.net, tglx@linutronix.de, mingo@kernel.org In-Reply-To: <20161124161013.dukr42y2nwscosk6@linutronix.de> References: <20161124161013.dukr42y2nwscosk6@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] net/iucv: Use explicit clean up labels in iucv_init() Git-Commit-ID: 97023a53c5f907e061d6bfa90462e36541f0ae65 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2221 Lines: 66 Commit-ID: 97023a53c5f907e061d6bfa90462e36541f0ae65 Gitweb: http://git.kernel.org/tip/97023a53c5f907e061d6bfa90462e36541f0ae65 Author: Sebastian Andrzej Siewior AuthorDate: Thu, 24 Nov 2016 17:10:13 +0100 Committer: Thomas Gleixner CommitDate: Thu, 24 Nov 2016 20:48:51 +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. Since the previous patch got already applied, here is a follow up patch. Suggested-by: Ursula Braun Signed-off-by: Sebastian Andrzej Siewior Cc: linux-s390@vger.kernel.org Cc: netdev@vger.kernel.org Cc: rt@linutronix.de Cc: "David S. Miller" Link: http://lkml.kernel.org/r/20161124161013.dukr42y2nwscosk6@linutronix.de Signed-off-by: Thomas Gleixner --- 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);