]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
brcmsmac: Add missing annotation for brcms_rfkill_set_hw_state()
authorJules Irenge <jbi.octave@gmail.com>
Sat, 11 Apr 2020 00:19:28 +0000 (01:19 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 15 Apr 2020 08:43:40 +0000 (11:43 +0300)
Sparse reports a warning at brcms_rfkill_set_hw_state()

warning: context imbalance in brcms_rfkill_set_hw_state()
- unexpected unlock
The root cause is the missing annotation at brcms_rfkill_set_hw_state()
Add the missing __must_hold(&wl->lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200411001933.10072-5-jbi.octave@gmail.com
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c

index 8e8b685cfe09b5161d3a2f7b1d03d8ee842472df..c3dbeacea6ca8849143a1405a47c8a82810c793f 100644 (file)
@@ -1717,6 +1717,7 @@ int brcms_check_firmwares(struct brcms_info *wl)
  * precondition: perimeter lock has been acquired
  */
 bool brcms_rfkill_set_hw_state(struct brcms_info *wl)
+       __must_hold(&wl->lock)
 {
        bool blocked = brcms_c_check_radio_disabled(wl->wlc);