usb: dwc3: gadget: Fix logical condition
authorTejas Joglekar <Tejas.Joglekar@synopsys.com>
Wed, 13 Nov 2019 06:15:16 +0000 (11:45 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 19:07:25 +0000 (20:07 +0100)
commitbf23594f2c8863a1c255137242eb50ef9ba75f8d
tree885219a358d3386f8d0510677d749a975495ae53
parent8fc27548af3916ee4bf685d1ce47eb9bd677b02a
usb: dwc3: gadget: Fix logical condition

commit 8c7d4b7b3d43c54c0b8c1e4adb917a151c754196 upstream.

This patch corrects the condition to kick the transfer without
giving back the requests when either request has remaining data
or when there are pending SGs. The && check was introduced during
spliting up the dwc3_gadget_ep_cleanup_completed_requests() function.

Fixes: f38e35dd84e2 ("usb: dwc3: gadget: split dwc3_gadget_ep_cleanup_completed_requests()")
Cc: stable@vger.kernel.org
Signed-off-by: Tejas Joglekar <joglekar@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c