diff --git a/msm/dp/dp_debug.c b/msm/dp/dp_debug.c index f3259691a5..5429600965 100644 --- a/msm/dp/dp_debug.c +++ b/msm/dp/dp_debug.c @@ -398,6 +398,8 @@ static ssize_t dp_debug_read_crc(struct file *file, char __user *user_buff, size sde_conn = to_sde_connector(drm_conn); panel = sde_conn->drv_panel; + if (!panel) + goto bail; } else { panel = debug->panel; } @@ -655,6 +657,8 @@ static ssize_t dp_debug_write_mst_con_id(struct file *file, mst_port = sde_conn->mst_port; dp_panel = sde_conn->drv_panel; + if (!dp_panel) + goto out; if (debug->dp_debug.sim_mode) { dp_sim_update_port_status(debug->sim_bridge,