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

Commit c77ae5c5 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 potential NULL pointer dereference"

parents 123b19fe e45e33a0
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -3448,8 +3448,14 @@ int mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl, bool is_recovery)
{
	u32 status = 1;
	int cnt = 20;
	struct mdss_mdp_mixer *mixer = ctl->mixer_left;
	struct mdss_mdp_mixer *mixer;

	if (!ctl) {
		pr_err("ctl not initialized\n");
		return -EINVAL;
	}

	mixer = ctl->mixer_left;
	mdss_mdp_ctl_write(ctl, MDSS_MDP_REG_CTL_SW_RESET, 1);

	/*
@@ -3467,7 +3473,8 @@ int mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl, bool is_recovery)
	if (mixer) {
		mdss_mdp_pipe_reset(mixer, is_recovery);

		if (ctl->mfd->split_mode == MDP_DUAL_LM_SINGLE_DISPLAY)
		if (ctl->mfd &&
		    (ctl->mfd->split_mode == MDP_DUAL_LM_SINGLE_DISPLAY))
			mdss_mdp_pipe_reset(ctl->mixer_right, is_recovery);
	}