Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df5d3208 authored by Jiebing Li's avatar Jiebing Li Committed by Dmitry Shmidt
Browse files

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: default avatarDu, Changbin <changbin.du@gmail.com>
Signed-off-by: default avatarWang, Yu <yu.y.wang@intel.com>
Signed-off-by: default avatarRuss Weight <russell.h.weight@intel.com>
parent a745b345
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
			 */