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

Commit 03db0519 authored by Sriharsha Allenki's avatar Sriharsha Allenki
Browse files

usb: gadget: mtp: Dequeue request upon vfs_write failure



When vfs_write fails, a request was already queued
on the out endpoint. If the request was rx_req[0], 
mtp_read results in a failure since it tries to queue
the same request. Fix this by dequeuing the request
when there is a vfs_write failure.

Change-Id: If82d9f7f3fb496cdc27983bd306d61000dc3396d
Signed-off-by: default avatarSriharsha Allenki <sallenki@codeaurora.org>
parent 06418ca4
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -955,6 +955,7 @@ static void receive_file_work(struct work_struct *data)
				r = -EIO;
				r = -EIO;
				if (dev->state != STATE_OFFLINE)
				if (dev->state != STATE_OFFLINE)
					dev->state = STATE_ERROR;
					dev->state = STATE_ERROR;
				usb_ep_dequeue(dev->ep_out, read_req);
				break;
				break;
			}
			}
			dev->perf[dev->dbg_write_index].vfs_wtime =
			dev->perf[dev->dbg_write_index].vfs_wtime =