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

Commit 8f19c20a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: f_fs: Fix epfile crash during composition switch"

parents ddf568f6 8e712e55
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -865,10 +865,18 @@ first_try:
		if (unlikely(ret < 0)) {
			/* nop */
		} else if (unlikely(wait_for_completion_interruptible(&done))) {
			ret = -EINTR;
			spin_lock_irq(&epfile->ffs->eps_lock);
			if (ep->ep)
				usb_ep_dequeue(ep->ep, req);
			spin_unlock_irq(&epfile->ffs->eps_lock);
			ret = -EINTR;
		} else {
			spin_lock_irq(&epfile->ffs->eps_lock);
			if (ep->ep)
				ret = ep->status;
			else
				ret = -ENODEV;
			spin_unlock_irq(&epfile->ffs->eps_lock);
			if (read && ret > 0) {
				if (ret > len)
					ret = -EOVERFLOW;