]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8723au: Fix incorrect pointer test introduced in previous commit
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 26 Apr 2014 16:54:50 +0000 (18:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2014 17:16:12 +0000 (10:16 -0700)
Commit da290c54610f49ef475f7f88668259216b08fc36 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>
drivers/staging/rtl8723au/core/rtw_mlme_ext.c

index 3a729a0a85b53f32c6fb3380ee7fccb4d52c3da1..21d112093fe1319db1f2b3cbd9c802c40b2642c2 100644 (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];