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

Commit 696dbc54 authored by Pawan Kumar's avatar Pawan Kumar
Browse files

msm: mdss: Check ctl in mdss_mdp_mixer_get before using



Put NULL check for ctl before using in mdss_mdp_mixer_get.

Change-Id: Ia1bc035df46c9e237c244623e61a6802cf0d9110
Signed-off-by: default avatarPawan Kumar <pavaku@codeaurora.org>
parent d38937d1
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1577,9 +1577,17 @@ int mdss_mdp_ctl_addr_setup(struct mdss_data_type *mdata,
struct mdss_mdp_mixer *mdss_mdp_mixer_get(struct mdss_mdp_ctl *ctl, int mux)
{
	struct mdss_mdp_mixer *mixer = NULL;
	struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(ctl->mfd);
	if (!ctl)
	struct mdss_overlay_private *mdp5_data = NULL;
	if (!ctl || !ctl->mfd) {
		pr_err("ctl not initialized\n");
		return NULL;
	}

	mdp5_data = mfd_to_mdp5_data(ctl->mfd);
	if (!mdp5_data) {
		pr_err("ctl not initialized\n");
		return NULL;
	}

	switch (mux) {
	case MDSS_MDP_MIXER_MUX_DEFAULT: