OSDN Git Service

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)
committerBrian Swetland <swetland@google.com>
Tue, 29 Mar 2011 20:58:24 +0000 (13:58 -0700)
commit17d8dc011be170084176c16a794ecb06c0e4d992
treef274078b6ef437df7ada28b2c8d5f7ed700e103e
parent87e72300ba68b7336f670d5aeaffe0185575e506
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