Message ID | iwlwifi.20210409123755.ba2ea961f4ae.I8fde32d3196e860efa3b4ec464c42194195b42ec@changeid |
---|---|
State | New |
Headers | show |
Series | cfg80211/mac80211 patches from our internal tree 2021-04-09 | expand |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 521d36bb0803..f56307185b8a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -7742,8 +7742,8 @@ static int nl80211_get_reg_do(struct sk_buff *skb, struct genl_info *info) REGULATORY_WIPHY_SELF_MANAGED; regdom = get_wiphy_regdom(wiphy); - /* a self-managed-reg device must have a private regdom */ - if (WARN_ON(!regdom && self_managed)) { + /* a self-managed-reg device should have a private regdom */ + if (!regdom && self_managed) { nlmsg_free(msg); rtnl_unlock(); return -EINVAL;