Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b89d38c3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Fix possible NULL dereference"

parents 7ce9fbcd c4340af7
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2086,6 +2086,7 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
	int ret = -EINVAL;
	int rc = 0;
	u32 ctrl_rev;
	bool hs_req = false;

	if (mdss_get_sd_client_cnt())
		return -EPERM;
@@ -2102,6 +2103,9 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
	MDSS_XLOG(ctrl->ndx, from_mdp, ctrl->mdp_busy, current->pid,
							XLOG_FUNC_ENTRY);

	if (req && (req->flags & CMD_REQ_HS_MODE))
		hs_req = true;

	/* make sure dsi_cmd_mdp is idle */
	mdss_dsi_cmd_mdp_busy(ctrl);

@@ -2207,8 +2211,7 @@ need_lock:
		mutex_unlock(&ctrl->cmd_mutex);
	} else {	/* from dcs send */
		if (ctrl->cmd_clk_ln_recovery_en &&
				ctrl->panel_mode == DSI_CMD_MODE &&
				(req->flags & CMD_REQ_HS_MODE))
				ctrl->panel_mode == DSI_CMD_MODE && hs_req)
			mdss_dsi_cmd_stop_hs_clk_lane(ctrl);
	}