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

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

Merge "usb: fix various gadget panics on 10gbps cabling"

parents c519e104 47870214
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -164,6 +164,14 @@ int usb_assign_descriptors(struct usb_function *f,
{
	struct usb_gadget *g = f->config->cdev->gadget;

	/* super-speed-plus descriptor falls back to super-speed one,
	 * if such a descriptor was provided, thus avoiding a NULL
	 * pointer dereference if a 5gbps capable gadget is used with
	 * a 10gbps capable config (device port + cable + host port)
	 */
	if (!ssp)
		ssp = ss;

	if (fs) {
		f->fs_descriptors = usb_copy_descriptors(fs);
		if (!f->fs_descriptors)