diff options
author | Nitin Kumbhar <nkumbhar@nvidia.com> | 2011-01-18 14:52:31 +0530 |
---|---|---|
committer | Nitin Kumbhar <nkumbhar@nvidia.com> | 2011-01-18 14:52:31 +0530 |
commit | 754deb500cac53edcff2165ca4edb8c8be896d2c (patch) | |
tree | 71356f7bf39e87b5d261ab69c159cb8a114831eb /drivers/usb/gadget/f_mtp.c | |
parent | 66e0ed154cfb916b83e3f0074f7cd197effaab39 (diff) | |
parent | 5edc1199f320e0d9226fe8b73711c6a171ce78de (diff) |
merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36
Conflicts:
drivers/net/wireless/bcm4329/Makefile
Change-Id: I31ce81e09c6f18d6966a5cffebc533453bce02d8
Diffstat (limited to 'drivers/usb/gadget/f_mtp.c')
-rw-r--r-- | drivers/usb/gadget/f_mtp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_mtp.c b/drivers/usb/gadget/f_mtp.c index 64fe3b3cd9e6..e07224fd9f89 100644 --- a/drivers/usb/gadget/f_mtp.c +++ b/drivers/usb/gadget/f_mtp.c @@ -756,8 +756,10 @@ static void receive_file_work(struct work_struct *data) /* wait for our last read to complete */ ret = wait_event_interruptible(dev->read_wq, dev->rx_done || dev->state != STATE_BUSY); - if (ret < 0 || dev->state != STATE_BUSY) { - r = ret; + if (dev->state == STATE_CANCELED) { + r = -ECANCELED; + if (!dev->rx_done) + usb_ep_dequeue(dev->ep_out, read_req); break; } /* if xfer_file_length is 0xFFFFFFFF, then we read until |