usb: gadget: udc: core: don't starve DMA resources

Always unmap all SG entries as required by DMA API

Fixes: a698908d3b ("usb: gadget: add generic map/unmap request utilities")
Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
Felipe Balbi 2016-08-24 14:33:27 +03:00
parent 511a36d2f3
commit 23fd537c95
1 changed files with 1 additions and 1 deletions

View File

@ -827,7 +827,7 @@ void usb_gadget_unmap_request_by_dev(struct device *dev,
return;
if (req->num_mapped_sgs) {
dma_unmap_sg(dev, req->sg, req->num_mapped_sgs,
dma_unmap_sg(dev, req->sg, req->num_sgs,
is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
req->num_mapped_sgs = 0;