--- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1605,17 +1605,18 @@ static int dwc3_probe(struct platform_de } dwc3_check_params(dwc); + dwc3_debugfs_init(dwc); ret = dwc3_core_init_mode(dwc); if (ret) goto err5; - dwc3_debugfs_init(dwc); pm_runtime_put(dev); return 0; err5: + dwc3_debugfs_exit(dwc); dwc3_event_buffers_cleanup(dwc); usb_phy_shutdown(dwc->usb2_phy);