aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mac80211_hwsim.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-11-19 18:51:55 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-11-19 18:51:55 +0100
commit6b67e01fc0c4f7759a3e6e75fdcf17195daa482e (patch)
treeb5f0e38f20f94623a145969c4689e68117dcca92 /drivers/net/wireless/mac80211_hwsim.c
parentb9995f83c33e3ff7486da0630a979a05edf2e982 (diff)
mac80211-hwsim: remove unnecessary hwname check
The hwname will always be set if idx is negative (as it's a u32 read into an s64 it can't overflow either) so we can remove the unnecessary check for hwname being non-NULL. This was reported by smatch. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index bbbcc4d8bb91..c88a21acda64 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2808,8 +2808,7 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)
if (data->idx != idx)
continue;
} else {
- if (hwname &&
- strcmp(hwname, wiphy_name(data->hw->wiphy)))
+ if (strcmp(hwname, wiphy_name(data->hw->wiphy)))
continue;
}