projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2d8eab
)
dwc3: flush cache only if there is a buffer attached to a request
author
Marek Szyprowski
<m.szyprowski@samsung.com>
Wed, 2 Oct 2019 12:19:14 +0000
(14:19 +0200)
committer
Marek Vasut
<marek.vasut+renesas@gmail.com>
Thu, 31 Oct 2019 11:12:31 +0000
(12:12 +0100)
Calling cache flush on invalid buffer, even with zero length might cause
an exception on certain platforms.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/usb/dwc3/gadget.c
patch
|
blob
|
history
diff --git
a/drivers/usb/dwc3/gadget.c
b/drivers/usb/dwc3/gadget.c
index 085f7b8968842bbdae3f08ac543b3b72ba96afda..67d11b4c0d7e9e2f2f2a3af2b1f04710a8c47352 100644
(file)
--- a/
drivers/usb/dwc3/gadget.c
+++ b/
drivers/usb/dwc3/gadget.c
@@
-242,7
+242,8
@@
void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
list_del(&req->list);
req->trb = NULL;
- dwc3_flush_cache((uintptr_t)req->request.dma, req->request.length);
+ if (req->request.length)
+ dwc3_flush_cache((uintptr_t)req->request.dma, req->request.length);
if (req->request.status == -EINPROGRESS)
req->request.status = status;