Skip to content

Commit

Permalink
brcmsmac: Add missing annotation for brcms_rfkill_set_hw_state()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
irenge authored and Kalle Valo committed Apr 15, 2020
1 parent 1c0e3c7 commit 2fe5efb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 2fe5efb

Please sign in to comment.