0
0
mirror of https://mirrors.bfsu.edu.cn/git/linux.git synced 2024-12-21 18:14:48 +08:00

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>
This commit is contained in:
Jules Irenge 2020-04-29 11:05:27 +01:00 committed by Felipe Balbi
parent 66bd76e79e
commit 7aca4393e6

View File

@ -427,6 +427,7 @@ static void set_link_state_by_speed(struct dummy_hcd *dum_hcd)
/* caller must hold lock */ /* caller must hold lock */
static void set_link_state(struct dummy_hcd *dum_hcd) static void set_link_state(struct dummy_hcd *dum_hcd)
__must_hold(&dum->lock)
{ {
struct dummy *dum = dum_hcd->dum; struct dummy *dum = dum_hcd->dum;
unsigned int power_bit; unsigned int power_bit;