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)
committerColin Cross <ccross@android.com>
Tue, 14 Jun 2011 16:09:52 +0000 (09:09 -0700)
commit7d5250301dbedff486708e88fec0a4e5640d23b2
tree94919d7cf441339f1f3aa9b05b6500d40870855e
parent090cbc41c937f03311d34b72ab435444ad752cb6
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