]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: Fix request complete check
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Sat, 14 Dec 2019 02:40:45 +0000 (18:40 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Dec 2019 18:54:58 +0000 (19:54 +0100)
commit5463b01b90893000c230046f325c4c5c082bb5f7
treed7499ffdc02e4b30aca5e0b7b687f9738f215309
parent4ef6e53b843cb7dfef92043b947bc86030249d9b
usb: dwc3: gadget: Fix request complete check

We can only check for IN direction if the request had completed. For OUT
direction, it's perfectly fine that the host can send less than the
setup length. Let's return true fall all cases of OUT direction.

Fixes: c0a43704326b ("usb: dwc3: gadget: simplify IOC handling")
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Link: https://lore.kernel.org/r/ac5a3593a94fdaa3d92e6352356b5f7a01ccdc7c.1576291140.git.thinhn@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c