mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-20 20:04:46 +00:00
dwc3: flush cache only if there is a buffer attached to a request
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>
This commit is contained in:
parent
d2d8eab421
commit
fd15b58c1a
1 changed files with 2 additions and 1 deletions
|
@ -242,7 +242,8 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
|
||||||
|
|
||||||
list_del(&req->list);
|
list_del(&req->list);
|
||||||
req->trb = NULL;
|
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)
|
if (req->request.status == -EINPROGRESS)
|
||||||
req->request.status = status;
|
req->request.status = status;
|
||||||
|
|
Loading…
Add table
Reference in a new issue