summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/dwc3-qcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc3/dwc3-qcom.c')
-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 313a8ac2bd60..a9bce4548019 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -928,10 +928,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);
clk_disable:
for (i = qcom->num_clocks - 1; i >= 0; i--) {
@@ -951,11 +953,12 @@ static void 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);
for (i = qcom->num_clocks - 1; i >= 0; i--) {