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

Commit e9b95d32 authored by Casey Piper's avatar Casey Piper
Browse files

msm: mdss: Validate mixer/ctl are not null



mdss_mdp_wb_mixer_destroy could theoretically be
called with null mixer or ctl, which would cause
a null pointer dereference. Adding a check to
prevent this from happening.

Change-Id: I376c449daf05c8ca4ebb789d402575598ee59d86
CRs-Fixed: 551787
Signed-off-by: default avatarCasey Piper <cpiper@codeaurora.org>
parent c99f9b85
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -589,6 +589,11 @@ int mdss_mdp_wb_mixer_destroy(struct mdss_mdp_mixer *mixer)
{
	struct mdss_mdp_ctl *ctl;

	if (!mixer || !mixer->ctl) {
		pr_err("invalid ctl handle\n");
		return -ENODEV;
	}

	ctl = mixer->ctl;
	mixer->rotator_mode = 0;