usb: dwc3-msm: Initialize mutex before registering extcon
Right after registering extcon usb pd driver is notifying
extcon status which results in scheduling dwc3_otg_sm_work.
dwc3_otg_sm_work will call dwc3_msm_resume where we are
acquiring mutex to protect enabling phy irqs. By this time
there is a chance that mutex is not initialized yet. Then
it will be a race between initialization and acquiring of
mutex which will cause the core to loop forever. Fix this
by initializing mutex before registering extcon.
Change-Id: I84c4b958816421a83738ab7f6005adc7eaf083b1
Signed-off-by:
Pratham Pratap <prathampratap@codeaurora.org>
Loading
Please register or sign in to comment