diff mbox series

usb: fix various gadget panics on 10gbps cabling

Message ID 20210608044201.3898589-1-zenczykowski@gmail.com
State New
Headers show
Series usb: fix various gadget panics on 10gbps cabling | expand

Commit Message

Maciej Żenczykowski June 8, 2021, 4:42 a.m. UTC
From: Maciej Żenczykowski <maze@google.com>

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
---
 drivers/usb/gadget/config.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
index 8bb25773b61e..d624f9f57f34 100644
--- a/drivers/usb/gadget/config.c
+++ b/drivers/usb/gadget/config.c
@@ -164,6 +164,10 @@  int usb_assign_descriptors(struct usb_function *f,
 {
 	struct usb_gadget *g = f->config->cdev->gadget;
 
+	/* In most cases this is good enough as a default */
+	if (!ssp)
+		ssp = ss;
+
 	if (fs) {
 		f->fs_descriptors = usb_copy_descriptors(fs);
 		if (!f->fs_descriptors)