summaryrefslogtreecommitdiff
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-05 16:51:29 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-02-11 18:44:58 +0100
commit83c7aa1a1475ae1c42640ab6e4559016142efc67 (patch)
tree1a93edf5cb47eea45a120bd34ab0c72383cb28b6 /net/wireless/scan.c
parentb207cdb07f3f01ec1adaac62e9d0cc918c60a81a (diff)
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>
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r--net/wireless/scan.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 5e0983d60428..02a238329c83 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -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;