USB: gadget: f_adb: dequeue request on error in adb_read
authorIliyan Malchev <malchev@google.com>
Fri, 18 Feb 2011 19:28:32 +0000 (11:28 -0800)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:07:01 +0000 (12:07 -0800)
commitd8ee7299b5ac5172c40c3dca5c1842d875987b30
treea2bff3566fd5614de88951f165541bf4ef0dcb3a
parent1b44e9c94df84e01cafd6e8f86df90a3a60502dd
USB: gadget: f_adb: dequeue request on error in adb_read

In adb_read(), if wait_event_interruptible() returns an error, we need to
remove the request from the EP queue.  Else, on the next call to adb_read(), we
will attempt to enqueue the request again, potentially corrupting the
queue.  This is what happens with musb_gadget_queue(), which does not check for
duplicate requests.

Signed-off-by: Iliyan Malchev <malchev@google.com>
drivers/usb/gadget/f_adb.c