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

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

Merge "USB: composite: Send stall when no config is active"

parents 184316e2 c92a72a8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1628,6 +1628,12 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
		case USB_DT_DEVICE:
			cdev->desc.bNumConfigurations =
				count_configs(cdev, USB_DT_DEVICE);
			if (cdev->desc.bNumConfigurations == 0) {
				pr_err("%s:config is not active. send stall\n",
								__func__);
				break;
			}

			cdev->desc.bMaxPacketSize0 =
				cdev->gadget->ep0->maxpacket;
			if (gadget_is_superspeed(gadget)) {