disp: msm: dp: clear MST sim context during DP sim disable
After freeing MST sim context memory the pointer isn't set to NULL leading to unauthorized memory access. Along with this fix, this change also defers checking sim device ports pointer at a more appropriate place in the function call. Change-Id: I20c09edbd454c9d491060815dc73bae34aab6b08 Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Gerrit - the friendly Code Review server

vecāks
5d2c1a0801
revīzija
31ae12f079
@@ -74,19 +74,18 @@ static int dp_debug_attach_sim_bridge(struct dp_debug_private *debug)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (debug->sim_bridge)
|
||||
return 0;
|
||||
if (!debug->sim_bridge) {
|
||||
ret = dp_sim_create_bridge(debug->dev, &debug->sim_bridge);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = dp_sim_create_bridge(debug->dev, &debug->sim_bridge);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (debug->sim_bridge->register_hpd)
|
||||
debug->sim_bridge->register_hpd(debug->sim_bridge,
|
||||
dp_debug_sim_hpd_cb, debug);
|
||||
}
|
||||
|
||||
dp_sim_update_port_num(debug->sim_bridge, 1);
|
||||
|
||||
if (debug->sim_bridge->register_hpd)
|
||||
debug->sim_bridge->register_hpd(debug->sim_bridge,
|
||||
dp_debug_sim_hpd_cb, debug);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user