projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9995f8
)
mac80211-hwsim: remove unnecessary hwname check
author
Johannes Berg
<
[email protected]
>
Wed, 19 Nov 2014 17:51:55 +0000
(18:51 +0100)
committer
Johannes Berg
<
[email protected]
>
Wed, 19 Nov 2014 17:51:55 +0000
(18:51 +0100)
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 <
[email protected]
>
drivers/net/wireless/mac80211_hwsim.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/mac80211_hwsim.c
b/drivers/net/wireless/mac80211_hwsim.c
index bbbcc4d8bb91b65cecb3d4bed4058cd45fb84977..c88a21acda648025d88a0c30ea9d3821edd3086b 100644
(file)
--- 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;
}