OSDN Git Service

usb: dwc3: core: Clean up ULPI device
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 27 Aug 2018 15:30:16 +0000 (18:30 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 6 Nov 2018 06:40:47 +0000 (08:40 +0200)
If dwc3_core_init_mode() fails with deferred probe,
next probe fails on sysfs with

sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:11.0/dwc3.0.auto/dwc3.0.auto.ulpi'

To avoid this failure, clean up ULPI device.

Cc: <stable@vger.kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.c

index becfbb8..2f2048a 100644 (file)
@@ -1499,6 +1499,7 @@ static int dwc3_probe(struct platform_device *pdev)
 
 err5:
        dwc3_event_buffers_cleanup(dwc);
+       dwc3_ulpi_exit(dwc);
 
 err4:
        dwc3_free_scratch_buffers(dwc);