Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b682c9b authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman
Browse files

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



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

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5bd28bc2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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];