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

Commit 220c0ff3 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 ab4497a1 0ea8116c
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -3154,7 +3154,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;
@@ -3450,24 +3450,20 @@ 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);

uninit_iommu:
	if (mdwc->iommu_map) {
		arm_iommu_detach_device(mdwc->dev);
		arm_iommu_release_mapping(mdwc->iommu_map);
	}
	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);
@@ -3504,8 +3500,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);