mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
USB: gadget: snps-udc: fix device name leak on probe failure
The gadget device name is set by UDC core when registering the gadget
and must not be set before to avoid leaking the name in intermediate
error paths (e.g. when detecting an older chip revision).
Fixes: 12ad0fcaf2 ("usb: gadget: amd5536udc: let udc-core manage gadget->dev")
Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260702141536.90887-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6b874d00c4
commit
29a142d3e8
|
|
@ -3133,7 +3133,6 @@ int udc_probe(struct udc *dev)
|
|||
/* device struct setup */
|
||||
dev->gadget.ops = &udc_ops;
|
||||
|
||||
dev_set_name(&dev->gadget.dev, "gadget");
|
||||
dev->gadget.name = name;
|
||||
dev->gadget.max_speed = USB_SPEED_HIGH;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user