From: Julia Lawall Date: Sat, 28 Aug 2010 15:41:06 +0000 (+0200) Subject: net/wireless: Remove double test X-Git-Tag: firefly_0821_release~7613^2~3670^2~265^2^2~188 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3653910714a4a9b19aadb202c24f7b1ae61d3556;p=firefly-linux-kernel-4.4.55.git net/wireless: Remove double test The same expression is tested twice and the result is the same each time. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @expression@ expression E; @@ ( * E || ... || E | * E && ... && E ) // Signed-off-by: Julia Lawall Signed-off-by: John W. Linville --- diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index 0ef17bc42bac..40385936e286 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c @@ -611,7 +611,7 @@ struct iw_statistics *get_wireless_stats(struct net_device *dev) #endif #ifdef CONFIG_CFG80211_WEXT - if (dev->ieee80211_ptr && dev->ieee80211_ptr && + if (dev->ieee80211_ptr && dev->ieee80211_ptr->wiphy && dev->ieee80211_ptr->wiphy->wext && dev->ieee80211_ptr->wiphy->wext->get_wireless_stats)