]> www.infradead.org Git - users/dwmw2/linux.git/commit
usb: gadget: net2272: Fix net2272_dequeue()
authorGuido Kiener <guido@kiener-muenchen.de>
Mon, 18 Mar 2019 08:18:34 +0000 (09:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2019 06:49:07 +0000 (08:49 +0200)
commit3cd83b5927dd8d4c8c87130a8ff362cb1f628419
tree2f0ee455ca1d0244e876ce805f6493e793cd0f4b
parent56b961175f49b1bb27d324795719150ff7414bda
usb: gadget: net2272: Fix net2272_dequeue()

[ Upstream commit 091dacc3cc10979ab0422f0a9f7fcc27eee97e69 ]

Restore the status of ep->stopped in function net2272_dequeue().

When the given request is not found in the endpoint queue
the function returns -EINVAL without restoring the state of
ep->stopped. Thus the endpoint keeps blocked and does not transfer
any data anymore.

This fix is only compile-tested, since we do not have a
corresponding hardware. An analogous fix was tested in the sibling
driver. See "usb: gadget: net2280: Fix net2280_dequeue()"

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
drivers/usb/gadget/udc/net2272.c