linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723au : remove goto & return error directly
@ 2015-05-07 11:22 Gujulan Elango, Hari Prasath (H.)
  2015-05-07 12:03 ` Jes Sorensen
  0 siblings, 1 reply; 10+ messages in thread
From: Gujulan Elango, Hari Prasath (H.) @ 2015-05-07 11:22 UTC (permalink / raw)
  To: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org
  Cc: Larry.Finger@lwfinger.net, Jes.Sorensen@redhat.com,
	linux-wireless@vger.kernel.org

Remove the goto and return error directly thereby removing a variable

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
---
 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,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-05-12 11:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-07 11:22 [PATCH] staging: rtl8723au : remove goto & return error directly Gujulan Elango, Hari Prasath (H.)
2015-05-07 12:03 ` Jes Sorensen
2015-05-07 12:19   ` Dan Carpenter
2015-05-07 13:49     ` Gujulan Elango, Hari Prasath (H.)
2015-05-07 14:09       ` Jes Sorensen
2015-05-12 10:37         ` Gujulan Elango, Hari Prasath (H.)
2015-05-12 11:16           ` Jes Sorensen
2015-05-07 14:08     ` Jes Sorensen
2015-05-07 14:29       ` Joe Perches
2015-05-07 14:44         ` Jes Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).