diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-08-21 00:19:41 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-08-21 00:19:41 -0700 |
| commit | b8646eb8a5d3cc57fdeadeba1c5441d948021d67 (patch) | |
| tree | 4b862cd9b0ba88016aab15e9fe2afd6b8b21c8da /drivers/usb | |
| parent | 445f7922e443ef94fe5e4a1b0982559f9b5bc7b6 (diff) | |
| parent | 44530217e837dbe84b660718dcf89ab392c50658 (diff) | |
Merge "usb: dwc3: msm: clear resource on dwc3_msm_probe defer"
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/dwc3/dwc3-msm.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c index 70db070b05d8..6eba6e593451 100644 --- a/drivers/usb/dwc3/dwc3-msm.c +++ b/drivers/usb/dwc3/dwc3-msm.c @@ -2898,7 +2898,7 @@ static int dwc3_msm_probe(struct platform_device *pdev) ret = dwc3_msm_get_clk_gdsc(mdwc); if (ret) { dev_err(&pdev->dev, "error getting clock or gdsc.\n"); - return ret; + goto err; } mdwc->id_state = DWC3_ID_FLOAT; @@ -3206,19 +3206,14 @@ static int dwc3_msm_probe(struct platform_device *pdev) return 0; put_dwc3: - platform_device_put(mdwc->dwc3); if (mdwc->bus_perf_client) msm_bus_scale_unregister_client(mdwc->bus_perf_client); + of_platform_depopulate(&pdev->dev); err: + destroy_workqueue(mdwc->dwc3_wq); return ret; } -static int dwc3_msm_remove_children(struct device *dev, void *data) -{ - device_unregister(dev); - return 0; -} - static int dwc3_msm_remove(struct platform_device *pdev) { struct dwc3_msm *mdwc = platform_get_drvdata(pdev); @@ -3255,8 +3250,7 @@ static int dwc3_msm_remove(struct platform_device *pdev) if (mdwc->hs_phy) mdwc->hs_phy->flags &= ~PHY_HOST_MODE; - platform_device_put(mdwc->dwc3); - device_for_each_child(&pdev->dev, NULL, dwc3_msm_remove_children); + of_platform_depopulate(&pdev->dev); dbg_event(0xFF, "Remov put", 0); pm_runtime_disable(mdwc->dev); |
