usb: dwc3-msm: don't enable runtime PM until probe finishes
If pm_runtime_enable() is called in the middle of probe(),
and it still has yet to initialize child devices, there
could be a race between when the parent's child_count is
incremented and when the RPM worker thread decides to place
the parent device into idle/suspend. This could cause a NULL
pointer dereference as the hs_phy member is not initialized,
yet dwc3_msm_suspend() is already being called.
Fix this by not calling pm_runtime_set_active/enable until
the end of probe, effectively disabling runtime PM until
everything has initialized.
Change-Id: Icf184789f0e3722e7901615a9d37dc3dd6950394
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment