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

Commit a0f39638 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: Check ctl in mdss_mdp_mixer_get before using"

parents c46b4fc3 696dbc54
Loading
Loading
Loading
Loading
+10 −2
Original line number Original line 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 *mdss_mdp_mixer_get(struct mdss_mdp_ctl *ctl, int mux)
{
{
	struct mdss_mdp_mixer *mixer = NULL;
	struct mdss_mdp_mixer *mixer = NULL;
	struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(ctl->mfd);
	struct mdss_overlay_private *mdp5_data = NULL;
	if (!ctl)
	if (!ctl || !ctl->mfd) {
		pr_err("ctl not initialized\n");
		return NULL;
		return NULL;
	}

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


	switch (mux) {
	switch (mux) {
	case MDSS_MDP_MIXER_MUX_DEFAULT:
	case MDSS_MDP_MIXER_MUX_DEFAULT: