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

Commit 5f68b92a 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_accessory: Fix NULL pointer dereference in acc_read()"

parents 6be40e2c 15b5ff20
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -625,8 +625,6 @@ static ssize_t acc_read(struct file *fp, char __user *buf,
	if (count > BULK_BUFFER_SIZE)
		count = BULK_BUFFER_SIZE;

	len = ALIGN(count, dev->ep_out->maxpacket);

	/* we will block until we're online */
	pr_debug("acc_read: waiting for online\n");
	ret = wait_event_interruptible(dev->read_wq, dev->online);
@@ -635,6 +633,8 @@ static ssize_t acc_read(struct file *fp, char __user *buf,
		goto done;
	}

	len = ALIGN(count, dev->ep_out->maxpacket);

	if (dev->rx_done) {
		// last req cancelled. try to get it.
		req = dev->rx_req[0];