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

Commit ae60235c 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_mass_storage: Increase the IN endpoint buffer allocation"

parents a94ea4bf f179d9bf
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2903,6 +2903,10 @@ int fsg_common_set_num_buffers(struct fsg_common *common, unsigned int n)
{
	struct fsg_buffhd *bh, *buffhds;
	int i, rc;
	size_t extra_buf_alloc = 0;

	if (common->gadget)
		extra_buf_alloc = common->gadget->extra_buf_alloc;

	rc = fsg_num_buffers_validate(n);
	if (rc != 0)
@@ -2920,7 +2924,8 @@ int fsg_common_set_num_buffers(struct fsg_common *common, unsigned int n)
		bh->next = bh + 1;
		++bh;
buffhds_first_it:
		bh->buf = kmalloc(FSG_BUFLEN, GFP_KERNEL);
		bh->buf = kmalloc(FSG_BUFLEN + extra_buf_alloc,
				GFP_KERNEL);
		if (unlikely(!bh->buf))
			goto error_release;
	} while (--i);