wifi: mac80211: chan: chandef is non-NULL for reserved

The last caller of this with a NULL argument was related to
the non-chanctx code, so we can now remove this odd logic.

Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240129194108.bad8ec1e76c8.I12287452f42c54baf75821e75491cf6d021af20a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2024-01-29 19:34:39 +01:00
parent 0a44dfc070
commit 9bf7079bc2

View File

@ -90,11 +90,11 @@ ieee80211_chanctx_reserved_chandef(struct ieee80211_local *local,
lockdep_assert_wiphy(local->hw.wiphy);
if (WARN_ON(!compat))
return NULL;
list_for_each_entry(link, &ctx->reserved_links,
reserved_chanctx_list) {
if (!compat)
compat = &link->reserved_chandef;
compat = cfg80211_chandef_compatible(&link->reserved_chandef,
compat);
if (!compat)