Signed-off-by: Jules Maselbas <jmaselbas@xxxxxxxxx> --- drivers/usb/dwc2/host.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/dwc2/host.c b/drivers/usb/dwc2/host.c index 4137dd3cb..a1f2e3ea1 100644 --- a/drivers/usb/dwc2/host.c +++ b/drivers/usb/dwc2/host.c @@ -154,6 +154,11 @@ static int transfer_chunk(struct dwc2 *dwc2, u8 hc, dma_addr = dma_map_single(dwc2->dev, buffer, xfer_len, in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); + if (dma_mapping_error(dwc2->dev, dma_addr)) { + dwc2_err(dwc2, "Failed to map buffer@0x%p for dma\n", buffer); + return -EFAULT; + } + dwc2_dbg(dwc2, "chunk: pid=%d xfer_len=%u pkts=%u dma_addr=%llx\n", *pid, xfer_len, num_packets, dma_addr); -- 2.21.0.196.g041f5ea _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox