diff options
author | Johannes Berg <johannes.berg@intel.com> | 2025-07-09 23:37:54 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2025-07-15 11:00:38 +0200 |
commit | 8aec30bb11280d932d0349e8d0727a6f29f8fcc4 (patch) | |
tree | 88f6416ead2c8bf69a15bf4476f178c55390b593 | |
parent | a6d521bafcb290294128a51b13dbf4baae5748fc (diff) |
wifi: mac80211: remove ieee80211_link_unreserve_chanctx() return value
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>
-rw-r--r-- | net/mac80211/chan.c | 8 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 4bcbcf9d98b5..73a590598934 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -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 * diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index ec68204fddc9..142b547ca606 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -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, |