From patchwork Thu Nov 5 05:36:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7558001 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 43E969F36A for ; Thu, 5 Nov 2015 05:36:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6F84020829 for ; Thu, 5 Nov 2015 05:36:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C24D20828 for ; Thu, 5 Nov 2015 05:36:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031076AbbKEFgf (ORCPT ); Thu, 5 Nov 2015 00:36:35 -0500 Received: from eusmtp01.atmel.com ([212.144.249.242]:27041 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031027AbbKEFge (ORCPT ); Thu, 5 Nov 2015 00:36:34 -0500 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Thu, 5 Nov 2015 06:36:27 +0100 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH RESEND 32/38] staging: wilc1000: remove goto from wlan_initialize_threads Date: Thu, 5 Nov 2015 14:36:33 +0900 Message-ID: <1446701799-24870-32-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446701799-24870-1-git-send-email-glen.lee@atmel.com> References: <1446701799-24870-1-git-send-email-glen.lee@atmel.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leo Kim This patch remove goto feature from wlan_initialize_threads function. Goto feature is 'wilc->close=0' & return result. So, remove goto feature and it was replaced with the return value directly, as well as removed unused ret variable. Also, execute 'wilc->close=0' before return. Signed-off-by: Leo Kim Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index c529a15..3c8155e 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -911,7 +911,6 @@ int wlan_initialize_threads(struct net_device *dev) { perInterface_wlan_t *nic; struct wilc *wilc; - int ret = 0; nic = netdev_priv(dev); wilc = nic->wilc; @@ -922,16 +921,12 @@ int wlan_initialize_threads(struct net_device *dev) "K_TXQ_TASK"); if (!wilc->txq_thread) { PRINT_ER("couldn't create TXQ thread\n"); - ret = -ENOBUFS; - goto _fail_2; + wilc->close = 0; + return -ENOBUFS; } down(&wilc->txq_thread_started); return 0; - -_fail_2: - wilc->close = 0; - return ret; } static void wlan_deinitialize_threads(struct net_device *dev)