Skip to content
Commit 70cdb930 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

usb: gadget: aspeed_udc: fix handling of tx_len == 0



The bug is that we should still enter this loop if "tx_len" is zero.

After adding the "last" variable, then the "chunk >= 0" condition is no
longer required but I left it for readability.

Fixes: c09b1f37 ("usb: gadget: aspeed_udc: cleanup loop in ast_dma_descriptor_setup()")
Reported-by: default avatarNeal Liu <neal_liu@aspeedtech.com>
Reviewed-by: default avatarNeal Liu <neal_liu@aspeedtech.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Yrq6F5okoX1y05rT@kili


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent babfcd94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment