ANDROID: usb: f_mtp: return error code if transfer error in receive_file_work function

receive_file_work() function should report error if it detect the urb
is not successfully transfered.

Patchset: mtp

Change-Id: I66898afe6b6ea2c33e6ea4c5ccf47d3a56d002dc
Signed-off-by: Du, Changbin <changbin.du@gmail.com>
Signed-off-by: Wang, Yu <yu.y.wang@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
This commit is contained in:
Jiebing Li
2015-03-10 11:27:10 +08:00
committed by Dmitry Shmidt
parent a745b345b7
commit df5d32089a

View File

@@ -873,6 +873,10 @@ static void receive_file_work(struct work_struct *data)
usb_ep_dequeue(dev->ep_out, read_req);
break;
}
if (read_req->status) {
r = read_req->status;
break;
}
/* if xfer_file_length is 0xFFFFFFFF, then we read until
* we get a zero length packet
*/