Skip to content
Snippets Groups Projects
Commit e1c08cf2 authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Felipe Balbi
Browse files

usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails


Call dwc2_debugfs_exit() and dwc2_hcd_remove() (if the HCD was enabled
earlier) when usb_add_gadget_udc() has failed. This ensures that the
debugfs entries created by dwc2_debugfs_init() as well as the HCD are
cleaned up in the error path.

Fixes: 207324a3 ("usb: dwc2: Postponed gadget registration to the udc class driver")
Acked-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent e518bdd9
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment