Explorar o código

Merge "disp: msm: dp: null check before accessing mst panel"

qctecmdr %!s(int64=2) %!d(string=hai) anos
pai
achega
1addbbdc2c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      msm/dp/dp_debug.c

+ 4 - 0
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,