]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211_hwsim: fix check for custom world regdom array size
authorJohannes Berg <johannes.berg@intel.com>
Mon, 22 Dec 2014 11:51:25 +0000 (12:51 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 22 Dec 2014 11:51:25 +0000 (12:51 +0100)
commit9914aa9a787a62087fb96fb6e2c6ebe7f77b4111
tree8dea75f24e4396e017a3ed3612b20a74ff5a7392
parent470cd80e5b573e473f69677f107a79376693d7ed
mac80211_hwsim: fix check for custom world regdom array size

David Binderman reports that the conditions in the first loop
are the wrong way around - checking the array contents before
the size.

Instead of leaving the empty loop there and reordering the two
checks unify it into a single loop that skips over non-matches
and exits after the first match.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c