diff mbox series

usb: dwc3: core: Clean up ULPI device

Message ID 20181030131950.15422-1-felipe.balbi@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series usb: dwc3: core: Clean up ULPI device | expand

Commit Message

Felipe Balbi Oct. 30, 2018, 1:19 p.m. UTC
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

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 | 1 +
 1 file changed, 1 insertion(+)

Comments

Felipe Balbi Oct. 30, 2018, 1:39 p.m. UTC | #1
Hi,

Felipe Balbi <felipe.balbi@linux.intel.com> writes:
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> 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 | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 88c80fcc39f5..fec97465ccac 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -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);
> -- 
> 2.19.1
>
> ---------------------------------------------------------------------
> Intel Finland Oy
> Registered Address: PL 281, 00181 Helsinki 
> Business Identity Code: 0357606 - 4 
> Domiciled in Helsinki 
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.

argh, apologies for this footer. Mail server had changes recently.
diff mbox series

Patch

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 88c80fcc39f5..fec97465ccac 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -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);