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

Commit 9bb342c0 authored by Abhijith Desai's avatar Abhijith Desai Committed by raghavendra ambadas
Browse files

fbdev: msm: Add null check for sctl



Check and flag error when sctl is NULL.

CRs-Fixed: 2242140
Change-Id: Idd6cdbcbff61fb0047ef565094deb044d393fd70
Signed-off-by: default avatarAbhijith Desai <desaia@codeaurora.org>
parent a4cb23ac
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1677,6 +1677,11 @@ static void clk_ctrl_delayed_off_work(struct work_struct *work)

		/* re-assign to have the correct order in the context */
		ctx = (struct mdss_mdp_cmd_ctx *) ctl->intf_ctx[MASTER_CTX];
		if (!sctl) {
			pr_err("invalid sctl\n");
			goto exit;
		}

		sctx = (struct mdss_mdp_cmd_ctx *) sctl->intf_ctx[MASTER_CTX];
		if (!ctx || !sctx) {
			pr_err("invalid %s %s\n",
@@ -1784,6 +1789,11 @@ static void clk_ctrl_gate_work(struct work_struct *work)

		/* re-assign to have the correct order in the context */
		ctx = (struct mdss_mdp_cmd_ctx *) ctl->intf_ctx[MASTER_CTX];
		if (!sctl) {
			pr_err("invalid sctl\n");
			goto exit;
		}

		sctx = (struct mdss_mdp_cmd_ctx *) sctl->intf_ctx[MASTER_CTX];
		if (!ctx || !sctx) {
			pr_err("%s ERROR invalid %s %s\n", __func__,