diff mbox series

[4/9] mac80211: Add missing annotation for brcms_rfkill_set_hw_state()

Message ID 20200411001933.10072-5-jbi.octave@gmail.com (mailing list archive)
State Accepted
Commit 2fe5efb8a475c856cd72a37fd73d82f5b5b563e0
Delegated to: Kalle Valo
Headers show
Series None | expand

Commit Message

Jules Irenge April 11, 2020, 12:19 a.m. UTC
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>
---
 drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kalle Valo April 15, 2020, 8:44 a.m. UTC | #1
Jules Irenge <jbi.octave@gmail.com> wrote:

> 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>

Patch applied to wireless-drivers-next.git, thanks.

2fe5efb8a475 brcmsmac: Add missing annotation for brcms_rfkill_set_hw_state()
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
index 8e8b685cfe09..c3dbeacea6ca 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
@@ -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);