Message ID | 20231109003040.a490f0117800.I12287452f42c54baf75821e75491cf6d021af20a@changeid (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Johannes Berg |
Headers | show |
Series | [RFC,1/2] wifi: mac80211: simplify non-chanctx drivers | expand |
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 0a08dc7b7976..085ea7ce5750 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -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)