Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6f2f8c8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "udc: core: Add handling for case where allocated buffer is not mapped"

parents 33e8cba9 7877b279
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -901,6 +901,7 @@ static struct usb_request *dwc3_gadget_ep_alloc_request(struct usb_ep *ep,

	req->epnum	= dep->number;
	req->dep	= dep;
	req->request.dma = DMA_ERROR_CODE;

	dep->allocated_requests++;

+1 −1
Original line number Diff line number Diff line
@@ -880,7 +880,7 @@ void usb_gadget_unmap_request_by_dev(struct device *dev,
				is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);

		req->num_mapped_sgs = 0;
	} else {
	} else if (req->dma != DMA_ERROR_CODE) {
		dma_unmap_single(dev, req->dma, req->length,
				is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
	}