From: Jules Irenge Date: Fri, 14 Feb 2020 20:47:33 +0000 (+0000) Subject: xhci: Add missing annotation for xhci_set_port_power() X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~2577^2~91 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=dce174e01d864ebc51091f404f0b1df2504340a5;p=linux.git xhci: Add missing annotation for xhci_set_port_power() Sparse reports a warning at xhci_set_port_power() warning: context imbalance in xhci_set_port_power - unexpected unlock The root cause is the missing annotation at xhci_set_port_power() Add the missing __must_hold(&xhci->lock) annotattion Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20200214204741.94112-23-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 7a3a29e5e9d2..57e3f2c5475a 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -558,6 +558,7 @@ struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd) */ static void xhci_set_port_power(struct xhci_hcd *xhci, struct usb_hcd *hcd, u16 index, bool on, unsigned long *flags) + __must_hold(&xhci->lock) { struct xhci_hub *rhub; struct xhci_port *port;