diff mbox

[1/3] cfg80211: remove unnecessary check

Message ID 195ce75d7f8c2db484ccea7453147289e880c148.1395219362.git.gamerh2o@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Gang ZHAO March 19, 2014, 9:04 a.m. UTC
RCU pointer bss->pub.beacon_ies is checked before in previous
statement:

if (rcu_access_pointer(bss->pub.beacon_ies))
	continue;

There is no need to check it twice(and in the wrong way :) ).

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
---
 net/wireless/scan.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Johannes Berg March 19, 2014, 2:25 p.m. UTC | #1
On Wed, 2014-03-19 at 17:04 +0800, Zhao, Gang wrote:
> RCU pointer bss->pub.beacon_ies is checked before in previous
> statement:
> 
> if (rcu_access_pointer(bss->pub.beacon_ies))
> 	continue;
> 
> There is no need to check it twice(and in the wrong way :) ).

Applied.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index d1ed4ae..7297d18 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -659,9 +659,6 @@  static bool cfg80211_combine_bsses(struct cfg80211_registered_device *dev,
 			continue;
 		if (ssidlen && ie[1] != ssidlen)
 			continue;
-		/* that would be odd ... */
-		if (bss->pub.beacon_ies)
-			continue;
 		if (WARN_ON_ONCE(bss->pub.hidden_beacon_bss))
 			continue;
 		if (WARN_ON_ONCE(!list_empty(&bss->hidden_list)))