From: Jes Sorensen Date: Sat, 26 Apr 2014 16:54:50 +0000 (+0200) Subject: staging: rtl8723au: Fix incorrect pointer test introduced in previous commit X-Git-Tag: next-20140428~14^2~106 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0b682c9bb68acb56b2cfbb086b0ad04470c77306;p=karo-tx-linux.git staging: rtl8723au: Fix incorrect pointer test introduced in previous commit Commit da290c54610f49ef475f7f88668259216b08fc36 inverted the check of the return value when converting to use cfg80211_find_ie(). Reported-by: Dan Carpenter Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 3a729a0a85b5..21d112093fe1 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -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];