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: firefly_0821_release~176^2~3465^2~39^2~1224 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0b682c9bb68acb56b2cfbb086b0ad04470c77306;p=firefly-linux-kernel-4.4.55.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];