Merge "usb: dwc3: Prevent use after free of dwc_ipc_log_ctx"

This commit is contained in:
qctecmdr 2020-12-22 02:45:57 -08:00 • committed by Gerrit - the friendly Code Review server
commit aef7cdeb00

View file

@ -4604,10 +4604,10 @@ static int dwc3_msm_remove(struct platform_device *pdev)
if (mdwc->hs_phy)
mdwc->hs_phy->flags &= ~PHY_HOST_MODE;
dbg_event(0xFF, "Remov put", 0);
platform_device_put(mdwc->dwc3);
of_platform_depopulate(&pdev->dev);
dbg_event(0xFF, "Remov put", 0);
pm_runtime_disable(mdwc->dev);
pm_runtime_barrier(mdwc->dev);
pm_runtime_put_sync(mdwc->dev);