summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/dwc3/dwc3-qcom.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 0f51a6c70b78..414ab8d25c6d 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -951,10 +951,12 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
interconnect_exit:
dwc3_qcom_interconnect_exit(qcom);
depopulate:
- if (np)
+ if (np) {
of_platform_depopulate(&pdev->dev);
- else
+ } else {
+ device_remove_software_node(&qcom->dwc3->dev);
platform_device_del(qcom->dwc3);
+ }
platform_device_put(qcom->dwc3);
free_urs:
if (qcom->urs_usb)
@@ -977,11 +979,12 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
struct device *dev = &pdev->dev;
int i;
- device_remove_software_node(&qcom->dwc3->dev);
- if (np)
+ if (np) {
of_platform_depopulate(&pdev->dev);
- else
+ } else {
+ device_remove_software_node(&qcom->dwc3->dev);
platform_device_del(qcom->dwc3);
+ }
platform_device_put(qcom->dwc3);
if (qcom->urs_usb)