[PATCH] usb: dwc2: host: Do not map buffer on zero len packet

Sascha Hauer sha at pengutronix.de
Wed Nov 24 23:45:41 PST 2021


On Mon, Nov 22, 2021 at 06:31:23PM +0100, Jules Maselbas wrote:
> The transfer_chunk can be called for zero length packet, in such case
> the buffer pointer is NULL and can fail to be mapped for the device.
> 
> In such case the device DMA address can be directly set to 0, as the
> buffer address should be NULL anyway, without calling map/unmap at all.
> 
> Signed-off-by: Jules Maselbas <jmaselbas at kalray.eu>
> ---
>  drivers/usb/dwc2/host.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Applied to master, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list