1
0
Fork 0

staging: rtl8723au: Fix incorrect pointer test introduced in previous commit

Commit da290c5461 inverted the check of
the return value when converting to use cfg80211_find_ie().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
wifi-calibration
Jes Sorensen 2014-04-26 18:54:50 +02:00 committed by Greg Kroah-Hartman
parent 5bd28bc2e4
commit 0b682c9bb6
1 changed files with 1 additions and 1 deletions

View File

@ -1385,7 +1385,7 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
supportRateNum = p[1];
p = cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES, pos, left);
if (!p) {
if (p) {
if (supportRateNum <= sizeof(supportRate)) {
memcpy(supportRate+supportRateNum, p + 2, p[1]);
supportRateNum += p[1];