dwc3-msm: Add check before calling stop host in restart callback
Display driver calls usb_pd_release_ss_lanes() callback to use
SS lines for higher bandwidth use cases. This results in USB PD
driver notify dwc3_msm driver to stop host mode and restart it
in highspeed mode. If DP adaptor is disconnected while
usb_pd_release_ss_lanes() in progress, then there is a chance
that stop host mode gets called again after disconnect handling
and results in Use after free scenario. Hence fix it by checking
whether host mode is active before calling stop host mode.
Change-Id: I2337f451b2f74ebb5178d40078ef6b2166e8f64c
Signed-off-by:
Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Loading
Please register or sign in to comment