提交 6b67e01f 编写于 作者: J Johannes Berg

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: NJohannes Berg <johannes.berg@intel.com>
上级 b9995f83
...@@ -2808,8 +2808,7 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) ...@@ -2808,8 +2808,7 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)
if (data->idx != idx) if (data->idx != idx)
continue; continue;
} else { } else {
if (hwname && if (strcmp(hwname, wiphy_name(data->hw->wiphy)))
strcmp(hwname, wiphy_name(data->hw->wiphy)))
continue; continue;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册