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

Commit 216f3300 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 12fdb0f7 e6b5a58c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1631,6 +1631,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;
			cdev->desc.bcdUSB = cpu_to_le16(0x0200);