diff options
author | Jules Irenge <jbi.octave@gmail.com> | 2020-04-29 11:05:27 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-05-25 11:09:40 +0300 |
commit | 7aca4393e6818311e26fe41909fad2f8577c9679 (patch) | |
tree | 1045fbe267028b6ca5d1b54eae3e70d8fa1a3951 /drivers/usb | |
parent | 66bd76e79e41eb79452e10d62f2099742a7feeb0 (diff) |
USB: dummy-hcd: Add missing annotation for set_link_state()
Sparse reports a warning at set_link_state()
warning: context imbalance in set_link_state() - unexpected unlock
The root cause is the missing annotation at set_link_state()
Add the missing __must_hold(&dum->lock)
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc/dummy_hcd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index 6e3e3ebf715f..39e053fe9a5a 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -427,6 +427,7 @@ static void set_link_state_by_speed(struct dummy_hcd *dum_hcd) /* caller must hold lock */ static void set_link_state(struct dummy_hcd *dum_hcd) + __must_hold(&dum->lock) { struct dummy *dum = dum_hcd->dum; unsigned int power_bit; |