From: "Gujulan Elango, Hari Prasath (H.)" <hgujulan@visteon.com>
To: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "Larry.Finger@lwfinger.net" <Larry.Finger@lwfinger.net>,
"Jes.Sorensen@redhat.com" <Jes.Sorensen@redhat.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: [PATCH] staging: rtl8723au : remove goto & return error directly
Date: Thu, 7 May 2015 11:22:25 +0000 [thread overview]
Message-ID: <20150507111652.GA10574@IND12F0122> (raw)
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
next reply other threads:[~2015-05-07 11:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 11:22 Gujulan Elango, Hari Prasath (H.) [this message]
2015-05-07 12:03 ` [PATCH] staging: rtl8723au : remove goto & return error directly 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150507111652.GA10574@IND12F0122 \
--to=hgujulan@visteon.com \
--cc=Jes.Sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).