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

Commit a466e5ee authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_uvc: Fix crash on disconnect/connect during streaming"

parents b0f92a6f 2998a545
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -250,7 +250,11 @@ uvc_video_alloc_requests(struct uvc_video *video)
	unsigned int i;
	int ret = -ENOMEM;

	BUG_ON(video->req_size);
	if (video->req_size) {
		pr_err("%s: close the video node and reopen it\n",
				__func__);
		return -EBUSY;
	}

	req_size = video->ep->maxpacket
		 * max_t(unsigned int, video->ep->maxburst, 1)