Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c741bc3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: msm: clear resource on dwc3_msm_probe defer"

parents bf8d9f33 1142ab74
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -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;
@@ -3207,19 +3207,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);
@@ -3256,8 +3251,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);