From 3d393f0303b5120aa8c98a8ee70535ea9604ef20 Mon Sep 17 00:00:00 2001 From: Zheng Bin Date: Thu, 16 Jun 2022 21:35:08 +0800 Subject: [PATCH] usb: gadget: aspeed_udc: fix missing spin_unlock_irqrestore in ast_udc_ep_queue 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 Signed-off-by: Zheng Bin Link: https://lore.kernel.org/r/20220616133508.3655864-1-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/udc/aspeed_udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/aspeed_udc.c b/drivers/usb/gadget/udc/aspeed_udc.c index 1fc1522..6c91f7f 100644 --- a/drivers/usb/gadget/udc/aspeed_udc.c +++ b/drivers/usb/gadget/udc/aspeed_udc.c @@ -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); -- 2.7.4