usb: dwc2: gadget: sparse warning of context imbalance
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Fri, 17 Oct 2014 04:44:02 +0000 (10:14 +0530)
committerFelipe Balbi <balbi@ti.com>
Thu, 23 Oct 2014 14:55:43 +0000 (09:55 -0500)
commitb585a48b8a9486f26a68886278f2c8f981676dd4
tree90a2aea6cebcbbc5d5eb2ec53018155b3f81747f
parentbfa6b18c680450c17512c741ed1d818695747621
usb: dwc2: gadget: sparse warning of context imbalance

sparse was giving the following warning:
        warning: context imbalance in 's3c_hsotg_ep_enable'
                - different lock contexts for basic block

we were returning ENOMEM while still holding the spinlock.
The sparse warning was fixed by releasing the spinlock before return.

Cc: <stable@vger.kernel.org> # v3.17
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c