USB: gadget: f_mtp: Make sure request is dequeued if transfer is canceled
authorMike Lockwood <lockwood@android.com>
Thu, 13 Jan 2011 21:19:57 +0000 (16:19 -0500)
committerColin Cross <ccross@android.com>
Tue, 14 Jun 2011 16:09:49 +0000 (09:09 -0700)
commit50fe49af85a941f6666a09c5bbf891d5044cb615
tree12a23536059996720085a68c3af8ba7601e1de68
parentfac435cf496230c2f24e1414fa27300136c2a838
USB: gadget: f_mtp: Make sure request is dequeued if transfer is canceled

If the host cancels a file transfer while we have a read request pending,
call usb_ep_dequeue to cancel the read.
Also return -ECANCELED from mtp_ioctl if we are canceled in MTP_RECEIVE_FILE

Signed-off-by: Mike Lockwood <lockwood@android.com>
drivers/usb/gadget/f_mtp.c