summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-10-26 22:36:47 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2019-10-26 22:36:47 +0200
commit228bd6243447f3e5613457e6400112f197dbba7b (patch)
tree4e3c9077bba56f8819899655fc712e6d593f472c
parentMerge tag 'driver-core-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
parentstaging: wlan-ng: fix exit return when sme->key_idx >= NUM_WEPKEYS (diff)
downloadlinux-228bd6243447f3e5613457e6400112f197dbba7b.tar.xz
linux-228bd6243447f3e5613457e6400112f197dbba7b.zip
Merge tag 'staging-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fix from Greg KH: "Here is a single staging driver fix, for the wlan-ng driver, that resolves a reported issue. It is been in linux-next for a while with no reported issues" * tag 'staging-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: wlan-ng: fix exit return when sme->key_idx >= NUM_WEPKEYS
-rw-r--r--drivers/staging/wlan-ng/cfg80211.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index eee1998c4b18..fac38c842ac5 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -469,10 +469,8 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
/* Set the encryption - we only support wep */
if (is_wep) {
if (sme->key) {
- if (sme->key_idx >= NUM_WEPKEYS) {
- err = -EINVAL;
- goto exit;
- }
+ if (sme->key_idx >= NUM_WEPKEYS)
+ return -EINVAL;
result = prism2_domibset_uint32(wlandev,
DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,