Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fd0c96b authored by Johannes Berg's avatar Johannes Berg Committed by Alistair Strachan
Browse files

UPSTREAM: 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: default avatarJohannes Berg <johannes.berg@intel.com>
(cherry picked from commit 6b67e01fc0c4f7759a3e6e75fdcf17195daa482e)
Bug: 70214720
Change-Id: I02fb34c32ec070a566ae4bd230bdb229a01b3f78
Signed-off-by: default avatarAlistair Strachan <astrachan@google.com>
parent 958def63
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2665,8 +2665,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;
		}