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>
This commit is contained in:
parent
5bd28bc2e4
commit
0b682c9bb6
|
@ -1385,7 +1385,7 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
|
||||||
supportRateNum = p[1];
|
supportRateNum = p[1];
|
||||||
|
|
||||||
p = cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES, pos, left);
|
p = cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES, pos, left);
|
||||||
if (!p) {
|
if (p) {
|
||||||
if (supportRateNum <= sizeof(supportRate)) {
|
if (supportRateNum <= sizeof(supportRate)) {
|
||||||
memcpy(supportRate+supportRateNum, p + 2, p[1]);
|
memcpy(supportRate+supportRateNum, p + 2, p[1]);
|
||||||
supportRateNum += p[1];
|
supportRateNum += p[1];
|
||||||
|
|
Loading…
Reference in a new issue