diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-26 16:36:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-26 16:36:47 -0400 |
commit | 228bd6243447f3e5613457e6400112f197dbba7b (patch) | |
tree | 4e3c9077bba56f8819899655fc712e6d593f472c /drivers | |
parent | 13fa692e3f86deed6c0d56b3004b694f0ccad3d4 (diff) | |
parent | 153c5d8191c26165dbbd2646448ca7207f7796d0 (diff) | |
download | linux-228bd6243447f3e5613457e6400112f197dbba7b.tar.bz2 |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/wlan-ng/cfg80211.c | 6 |
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, |