]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mac80211: remove ieee80211_link_unreserve_chanctx() return value
authorJohannes Berg <johannes.berg@intel.com>
Wed, 9 Jul 2025 20:37:54 +0000 (23:37 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 15 Jul 2025 09:00:38 +0000 (11:00 +0200)
All the paths that could return an error are considered
misuses of the function and WARN already, and none of
the callers ever check the return value. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.5b436ee3c20c.Ieff61ec510939adb5fe6da4840557b649b3aa820@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/chan.c
net/mac80211/ieee80211_i.h

index 4bcbcf9d98b55a7d6243707e5304cf1ee44b5673..73a590598934cc9cf2976656266292d0e3a34054 100644 (file)
@@ -1108,7 +1108,7 @@ void ieee80211_link_copy_chanctx_to_vlans(struct ieee80211_link_data *link,
        __ieee80211_link_copy_chanctx_to_vlans(link, clear);
 }
 
-int ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link)
+void ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link)
 {
        struct ieee80211_sub_if_data *sdata = link->sdata;
        struct ieee80211_chanctx *ctx = link->reserved_chanctx;
@@ -1116,7 +1116,7 @@ int ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link)
        lockdep_assert_wiphy(sdata->local->hw.wiphy);
 
        if (WARN_ON(!ctx))
-               return -EINVAL;
+               return;
 
        list_del(&link->reserved_chanctx_list);
        link->reserved_chanctx = NULL;
@@ -1124,7 +1124,7 @@ int ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link)
        if (ieee80211_chanctx_refcount(sdata->local, ctx) == 0) {
                if (ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER) {
                        if (WARN_ON(!ctx->replace_ctx))
-                               return -EINVAL;
+                               return;
 
                        WARN_ON(ctx->replace_ctx->replace_state !=
                                IEEE80211_CHANCTX_WILL_BE_REPLACED);
@@ -1140,8 +1140,6 @@ int ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link)
                        ieee80211_free_chanctx(sdata->local, ctx, false);
                }
        }
-
-       return 0;
 }
 
 static struct ieee80211_chanctx *
index ec68204fddc9722eba9b33d914eae05d35e866e7..142b547ca606aa408473fc2d6524e6af3e207b51 100644 (file)
@@ -2697,7 +2697,7 @@ ieee80211_link_reserve_chanctx(struct ieee80211_link_data *link,
                               bool radar_required);
 int __must_check
 ieee80211_link_use_reserved_context(struct ieee80211_link_data *link);
-int ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link);
+void ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link);
 
 int __must_check
 ieee80211_link_change_chanreq(struct ieee80211_link_data *link,