From patchwork Thu May 7 11:22:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gujulan Elango, Hari Prasath (H.)" X-Patchwork-Id: 6357171 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0B981BEEE1 for ; Thu, 7 May 2015 11:22:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 31B21203AF for ; Thu, 7 May 2015 11:22:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F140B2034E for ; Thu, 7 May 2015 11:22:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbbEGLWa (ORCPT ); Thu, 7 May 2015 07:22:30 -0400 Received: from mail-am1on0132.outbound.protection.outlook.com ([157.56.112.132]:49504 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751757AbbEGLW3 convert rfc822-to-8bit (ORCPT ); Thu, 7 May 2015 07:22:29 -0400 Received: from AM3PR06MB1297.eurprd06.prod.outlook.com (25.163.186.139) by AM3PR06MB1300.eurprd06.prod.outlook.com (25.163.186.142) with Microsoft SMTP Server (TLS) id 15.1.154.19; Thu, 7 May 2015 11:22:26 +0000 Received: from AM3PR06MB1297.eurprd06.prod.outlook.com ([25.163.186.139]) by AM3PR06MB1297.eurprd06.prod.outlook.com ([25.163.186.139]) with mapi id 15.01.0154.018; Thu, 7 May 2015 11:22:26 +0000 From: "Gujulan Elango, Hari Prasath (H.)" To: "devel@driverdev.osuosl.org" , "gregkh@linuxfoundation.org" CC: "Larry.Finger@lwfinger.net" , "Jes.Sorensen@redhat.com" , "linux-wireless@vger.kernel.org" Subject: [PATCH] staging: rtl8723au : remove goto & return error directly Thread-Topic: [PATCH] staging: rtl8723au : remove goto & return error directly Thread-Index: AQHQiLgYRhXQ8kGZF0SdHaCfzX7XGw== Date: Thu, 7 May 2015 11:22:25 +0000 Message-ID: <20150507111652.GA10574@IND12F0122> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [74.112.164.116] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR06MB1300; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:AM3PR06MB1300; BCL:0; PCL:0; RULEID:; SRVR:AM3PR06MB1300; x-forefront-prvs: 056929CBB8 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(122556002)(66066001)(33656002)(19580405001)(19580395003)(2501003)(5001770100001)(40100003)(5001960100002)(33716001)(102836002)(92566002)(62966003)(46102003)(77156002)(86362001)(2656002)(87936001)(2900100001)(54356999)(229853001)(106116001)(50986999)(189998001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM3PR06MB1300; H:AM3PR06MB1297.eurprd06.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; Content-ID: MIME-Version: 1.0 X-OriginatorOrg: visteon.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2015 11:22:25.9454 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7a147aaf-01ec-498c-80a1-e34a8c63c548 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR06MB1300 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=ham 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 Remove the goto and return error directly thereby removing a variable Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index b139ed4..a979048 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -1209,7 +1209,6 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, struct rtw_adapter *padapter = wiphy_to_adapter(wiphy); struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct wireless_dev *rtw_wdev = wiphy_to_wdev(wiphy); - int ret = 0; DBG_8723A("%s(%s): call netdev_open23a\n", __func__, ndev->name); @@ -1238,14 +1237,12 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, if (cfg80211_infrastructure_mode(padapter, type) != _SUCCESS) { rtw_wdev->iftype = old_type; - ret = -EPERM; - goto exit; + return -EPERM; } rtw_setopmode_cmd23a(padapter, type); -exit: - return ret; + return 0; } void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv,