From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
To: dan.carpenter@oracle.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Tim Collier <osdevtc@gmail.com>,
Chris Opperman <eklikeroomys@gmail.com>,
Hariprasad Kelam <hariprasad.kelam@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3] drivers: staging : wlan-ng : collect return status without variable
Date: Sun, 12 May 2019 16:23:45 +0530 [thread overview]
Message-ID: <20190512105345.GA4046@hari-Inspiron-1545> (raw)
As caller rdev_set_default_key not particular about -EFAULT.
We can preserve the return value of prism2_domibset_uint32.
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
----
Changes in v2:
- remove masking of original return value with EFAULT
Changes in v3:
- merge patch v1 and v2 sothat it can be applied on linux-next
---
drivers/staging/wlan-ng/cfg80211.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index 8a862f7..eee1998 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -231,17 +231,9 @@ static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev,
{
struct wlandevice *wlandev = dev->ml_priv;
- int err = 0;
- int result = 0;
-
- result = prism2_domibset_uint32(wlandev,
- DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
- key_index);
-
- if (result)
- err = -EFAULT;
-
- return err;
+ return prism2_domibset_uint32(wlandev,
+ DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
+ key_index);
}
static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
--
2.7.4
next reply other threads:[~2019-05-12 10:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-12 10:53 Hariprasad Kelam [this message]
2019-05-13 8:24 ` [PATCH v3] drivers: staging : wlan-ng : collect return status without variable Dan Carpenter
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=20190512105345.GA4046@hari-Inspiron-1545 \
--to=hariprasad.kelam@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=eklikeroomys@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=osdevtc@gmail.com \
/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