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

usb: gadget: aspeed_udc: cleanup loop in ast_dma_descriptor_setup()



The "chunk >= 0" condition does not work because count is a u32.
Also, really we shouldn't enter the loop when "chunk" is zero.

Once that condition is fixed then there is no need for the "last"
variable.  I reversed the "if (chunk <= ep->chunk_max)" as well.
The new loop is much simpler.

Fixes: 055276c1 ("usb: gadget: add Aspeed ast2600 udc driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Yq2SvM2bbrtSd1H9@kili


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3d393f03
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