mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
usb: gadget: pch_udc: Check for DMA mapping error
[ Upstream commit4a28d77e35] DMA mapping might fail, we have to check it with dma_mapping_error(). Otherwise DMA-API is not happy: DMA-API: pch_udc 0000:02:02.4: device driver failed to check map error[device address=0x00000000027ee678] [size=64 bytes] [mapped as single] Fixes:abab0c67c0("usb: pch_udc: Fixed issue which does not work with g_serial") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210323153626.54908-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a6e680788c
commit
3b67698060
@@ -2955,7 +2955,7 @@ static int init_dma_pools(struct pch_udc_dev *dev)
|
||||
dev->dma_addr = dma_map_single(&dev->pdev->dev, ep0out_buf,
|
||||
UDC_EP0OUT_BUFF_SIZE * 4,
|
||||
DMA_FROM_DEVICE);
|
||||
return 0;
|
||||
return dma_mapping_error(&dev->pdev->dev, dev->dma_addr);
|
||||
}
|
||||
|
||||
static int pch_udc_start(struct usb_gadget *g,
|
||||
|
||||
Reference in New Issue
Block a user