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

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

staging: rtl8723au: process_80211d(): Fix order of advancing array pos



Fix smatch warning from advancing array index before reading out the
value of the array.

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 79a76349
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4867,9 +4867,9 @@ static void process_80211d(struct rtw_adapter *padapter,
		if (!ie || ie[1] < IEEE80211_COUNTRY_IE_MIN_LEN)
			return;

		ie += 2;
		p = ie;
		p = ie + 2;
		ie += ie[1];
		ie += 2;

		memcpy(country, p, 3);
		country[3] = '\0';