* [PATCH -next] usb: gadget: aspeed_udc: fix missing spin_unlock_irqrestore in ast_udc_ep_queue
@ 2022-06-16 13:35 Zheng Bin
2022-06-17 2:20 ` Neal Liu
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Bin @ 2022-06-16 13:35 UTC (permalink / raw)
To: neal_liu, balbi, gregkh, joel, andrew, linux-aspeed, linux-usb,
linux-arm-kernel, linux-kernel
Cc: zhengbin13, gaochao49
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")
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
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 1fc15228ff15..6c91f7f288a2 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.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH -next] usb: gadget: aspeed_udc: fix missing spin_unlock_irqrestore in ast_udc_ep_queue
2022-06-16 13:35 [PATCH -next] usb: gadget: aspeed_udc: fix missing spin_unlock_irqrestore in ast_udc_ep_queue Zheng Bin
@ 2022-06-17 2:20 ` Neal Liu
0 siblings, 0 replies; 2+ messages in thread
From: Neal Liu @ 2022-06-17 2:20 UTC (permalink / raw)
To: Zheng Bin, balbi, gregkh, joel, andrew, linux-aspeed, linux-usb,
linux-arm-kernel, linux-kernel
Cc: gaochao49
> 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")
> Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
> ---
> 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 1fc15228ff15..6c91f7f288a2 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.31.1
Thanks for the fix.
Reviewed-by: Neal Liu <neal_liu@aspeedtech.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-17 2:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 13:35 [PATCH -next] usb: gadget: aspeed_udc: fix missing spin_unlock_irqrestore in ast_udc_ep_queue Zheng Bin
2022-06-17 2:20 ` Neal Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).