cfg80211: remove scan ies NULL check
There's no way scan BSS IEs can be NULL as even if the allocation fails the frame is discarded. Remove some code checking for this and document that it is always non-NULL. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
b207cdb07f
commit
83c7aa1a14
3 changed files with 7 additions and 17 deletions
|
@ -1293,15 +1293,10 @@ ieee80211_bss(struct wiphy *wiphy, struct iw_request_info *info,
|
|||
|
||||
rcu_read_lock();
|
||||
ies = rcu_dereference(bss->pub.ies);
|
||||
if (ies) {
|
||||
rem = ies->len;
|
||||
ie = ies->data;
|
||||
} else {
|
||||
rem = 0;
|
||||
ie = NULL;
|
||||
}
|
||||
rem = ies->len;
|
||||
ie = ies->data;
|
||||
|
||||
while (ies && rem >= 2) {
|
||||
while (rem >= 2) {
|
||||
/* invalid data */
|
||||
if (ie[1] > rem - 2)
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue