Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: remove label usage in ieee80211_start_radar_detection()

After locks rework [1], ieee80211_start_radar_detection() function is no
longer acquiring any lock as such explicitly. Hence, it is not unlocking
anything as well. However, label "out_unlock" is still used which creates
confusion. Also, now there is no need of goto label as such.

Get rid of the goto logic and use direct return statements.

[1]: https://lore.kernel.org/all/20230828135928.b1c6efffe9ad.I4aec875e25abc9ef0b5ad1e70b5747fd483fbd3c@changeid/

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Link: https://patch.msgid.link/20240906064426.2101315-3-quic_adisi@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Aditya Kumar Singh and committed by
Johannes Berg
f403fed7 6241d79f

+4 -7
+4 -7
net/mac80211/cfg.c
··· 3471 3471 3472 3472 lockdep_assert_wiphy(local->hw.wiphy); 3473 3473 3474 - if (!list_empty(&local->roc_list) || local->scanning) { 3475 - err = -EBUSY; 3476 - goto out_unlock; 3477 - } 3474 + if (!list_empty(&local->roc_list) || local->scanning) 3475 + return -EBUSY; 3478 3476 3479 3477 /* whatever, but channel contexts should not complain about that one */ 3480 3478 sdata->deflink.smps_mode = IEEE80211_SMPS_OFF; ··· 3481 3483 err = ieee80211_link_use_channel(&sdata->deflink, &chanreq, 3482 3484 IEEE80211_CHANCTX_SHARED); 3483 3485 if (err) 3484 - goto out_unlock; 3486 + return err; 3485 3487 3486 3488 wiphy_delayed_work_queue(wiphy, &sdata->deflink.dfs_cac_timer_work, 3487 3489 msecs_to_jiffies(cac_time_ms)); 3488 3490 3489 - out_unlock: 3490 - return err; 3491 + return 0; 3491 3492 } 3492 3493 3493 3494 static void ieee80211_end_cac(struct wiphy *wiphy,