Skip to content

Commit 8aec30b

Browse files
committed
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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250709233537.5b436ee3c20c.Ieff61ec510939adb5fe6da4840557b649b3aa820@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent a6d521b commit 8aec30b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

net/mac80211/chan.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,23 +1108,23 @@ void ieee80211_link_copy_chanctx_to_vlans(struct ieee80211_link_data *link,
11081108
__ieee80211_link_copy_chanctx_to_vlans(link, clear);
11091109
}
11101110

1111-
int ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link)
1111+
void ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link)
11121112
{
11131113
struct ieee80211_sub_if_data *sdata = link->sdata;
11141114
struct ieee80211_chanctx *ctx = link->reserved_chanctx;
11151115

11161116
lockdep_assert_wiphy(sdata->local->hw.wiphy);
11171117

11181118
if (WARN_ON(!ctx))
1119-
return -EINVAL;
1119+
return;
11201120

11211121
list_del(&link->reserved_chanctx_list);
11221122
link->reserved_chanctx = NULL;
11231123

11241124
if (ieee80211_chanctx_refcount(sdata->local, ctx) == 0) {
11251125
if (ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER) {
11261126
if (WARN_ON(!ctx->replace_ctx))
1127-
return -EINVAL;
1127+
return;
11281128

11291129
WARN_ON(ctx->replace_ctx->replace_state !=
11301130
IEEE80211_CHANCTX_WILL_BE_REPLACED);
@@ -1140,8 +1140,6 @@ int ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link)
11401140
ieee80211_free_chanctx(sdata->local, ctx, false);
11411141
}
11421142
}
1143-
1144-
return 0;
11451143
}
11461144

11471145
static struct ieee80211_chanctx *

net/mac80211/ieee80211_i.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2697,7 +2697,7 @@ ieee80211_link_reserve_chanctx(struct ieee80211_link_data *link,
26972697
bool radar_required);
26982698
int __must_check
26992699
ieee80211_link_use_reserved_context(struct ieee80211_link_data *link);
2700-
int ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link);
2700+
void ieee80211_link_unreserve_chanctx(struct ieee80211_link_data *link);
27012701

27022702
int __must_check
27032703
ieee80211_link_change_chanreq(struct ieee80211_link_data *link,

0 commit comments

Comments
 (0)