Skip to content

Commit

Permalink
wifi: mac80211: clean up a needless assignment in ieee80211_sta_activ…
Browse files Browse the repository at this point in the history
…ate_link()

Commit 177577d ("wifi: mac80211: sta_info: fix link_sta insertion")
makes ieee80211_sta_activate_link() return 0 in the 'hash' label case.
Hence, setting ret in the !test_sta_flag(...) branch to zero is not needed
anymore and can be dropped.

Remove a needless assignment.

No functional change. No change in object code.

Signed-off-by: Lukas Bulwahn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
bulwahn authored and jmberg-intel committed Aug 25, 2022
1 parent 3579f4c commit 80e2b1f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -2778,10 +2778,8 @@ int ieee80211_sta_activate_link(struct sta_info *sta, unsigned int link_id)

sta->sta.valid_links = new_links;

if (!test_sta_flag(sta, WLAN_STA_INSERTED)) {
ret = 0;
if (!test_sta_flag(sta, WLAN_STA_INSERTED))
goto hash;
}

ret = drv_change_sta_links(sdata->local, sdata, &sta->sta,
old_links, new_links);
Expand Down

0 comments on commit 80e2b1f

Please sign in to comment.