USB: UDC: net22{80,72}: remove mistaken test of req->zero
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 15 Apr 2019 17:35:46 +0000 (13:35 -0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 3 May 2019 06:13:47 +0000 (09:13 +0300)
commitde497f634609aa1710fef4b6d833a037120369cc
treebc4e821bd042d47dd73747202c7af475f7fdfc45
parent6574abe69946589bf0f69cf9b32f6a2c71ae764f
USB: UDC: net22{80,72}: remove mistaken test of req->zero

The net2280 UDC driver (and also net2272, probably via copy-and-paste)
incorrectly checks the req->zero flag during OUT transfers, after
copying data from the UDC's FIFO into memory.  This makes no sense at
all; the "zero" flag indicates that an extra zero-length packet should
be appended to an IN transfer if the length is an even multiple of the
maxpacket size.  It has nothing to do with OUT transfers.

In practice this doesn't cause any problems because gadget drivers
never set req->zero for OUT transfers anyway.  Still, it is an error
and unnecessary code, so this patch removes the check.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/net2272.c
drivers/usb/gadget/udc/net2280.c