mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 16:44:27 +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:
parent
66bd76e79e
commit
7aca4393e6
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user