summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/udc/m66592-udc.c
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2023-02-01 23:01:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-02 09:41:17 +0100
commit30d09b3131f5b1b9d54ad9b7ee171a45e21362b3 (patch)
tree0f17433be73d20e43fb94ce3f50c3525c6ed522a /drivers/usb/gadget/udc/m66592-udc.c
parentusb: gadget: f_uac2: Fix incorrect increment of bNumEndpoints (diff)
downloadlinux-30d09b3131f5b1b9d54ad9b7ee171a45e21362b3.tar.xz
linux-30d09b3131f5b1b9d54ad9b7ee171a45e21362b3.zip
usb: gadget: udc: do not clear gadget driver.bus
Before the commit fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") gadget driver.bus was unused. For whatever reason, many UDC drivers set this field explicitly to NULL in udc_start(). With the newly added gadget bus, doing this will crash the driver during the attach. The problem was first reported, fixed and tested with OMAP UDC and g_ether. Other drivers are changed based on code analysis only. Fixes: fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") Cc: stable <stable@kernel.org> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20230201220125.GD2415@darkstar.musicnaut.iki.fi Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/udc/m66592-udc.c')
-rw-r--r--drivers/usb/gadget/udc/m66592-udc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c
index c7e421b449f3..06e21cee431b 100644
--- a/drivers/usb/gadget/udc/m66592-udc.c
+++ b/drivers/usb/gadget/udc/m66592-udc.c
@@ -1454,7 +1454,6 @@ static int m66592_udc_start(struct usb_gadget *g,
struct m66592 *m66592 = to_m66592(g);
/* hook up the driver */
- driver->driver.bus = NULL;
m66592->driver = driver;
m66592_bset(m66592, M66592_VBSE | M66592_URST, M66592_INTENB0);