usb: gadget: aspeed_udc: fix missing spin_unlock_irqrestore in ast_udc_ep_queue
authorZheng Bin <zhengbin13@huawei.com>
Thu, 16 Jun 2022 13:35:08 +0000 (21:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jun 2022 14:29:50 +0000 (16:29 +0200)
ast_udc_ep_queue misses spin_unlock_irqrestore in an error path,
this patch fixes that.

Fixes: 055276c13205 ("usb: gadget: add Aspeed ast2600 udc driver")
Reviewed-by: Neal Liu <neal_liu@aspeedtech.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
Link: https://lore.kernel.org/r/20220616133508.3655864-1-zhengbin13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/aspeed_udc.c

index 1fc1522..6c91f7f 100644 (file)
@@ -665,7 +665,8 @@ static int ast_udc_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
        if (ep->ep.desc == NULL) {
                if ((req->req.dma % 4) != 0) {
                        dev_warn(dev, "EP0 req dma alignment error\n");
-                       return -ESHUTDOWN;
+                       rc = -ESHUTDOWN;
+                       goto end;
                }
 
                ast_udc_ep0_queue(ep, req);