OSDN Git Service

USB: dummy-hcd: Add missing annotation for set_link_state()
authorJules Irenge <jbi.octave@gmail.com>
Wed, 29 Apr 2020 10:05:27 +0000 (11:05 +0100)
committerFelipe Balbi <balbi@kernel.org>
Mon, 25 May 2020 08:09:40 +0000 (11:09 +0300)
commit7aca4393e6818311e26fe41909fad2f8577c9679
tree1045fbe267028b6ca5d1b54eae3e70d8fa1a3951
parent66bd76e79e41eb79452e10d62f2099742a7feeb0
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>
drivers/usb/gadget/udc/dummy_hcd.c