projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66bd76e
)
USB: dummy-hcd: Add missing annotation for set_link_state()
author
Jules Irenge
<jbi.octave@gmail.com>
Wed, 29 Apr 2020 10:05:27 +0000
(11:05 +0100)
committer
Felipe Balbi
<balbi@kernel.org>
Mon, 25 May 2020 08:09:40 +0000
(11:09 +0300)
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>
drivers/usb/gadget/udc/dummy_hcd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/gadget/udc/dummy_hcd.c
b/drivers/usb/gadget/udc/dummy_hcd.c
index 6e3e3ebf715f040dd253f1486217fbe6e5a7e61f..39e053fe9a5ab923df42add7c3f545949661b244 100644
(file)
--- 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;