Unverified Commit 64b422d4 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents dc277c52 a41646b1
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)