[PATCH] usb: gadget: aspeed_udc: fix handling of tx_len == 0

Dan Carpenter dan.carpenter at oracle.com
Thu Jun 23 16:43:20 AEST 2022


On Thu, Jun 23, 2022 at 01:41:49AM +0000, Neal Liu wrote:
> > 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.
> > 
> 
> Use either "chunk >=0" or "last".
> I think the former is more simpler.

chunk >= 0 doesn't work.  last works but I think this way is more
readable.

regards,
dan carpenter



More information about the Linux-aspeed mailing list