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: Casey Piper <cpiper@codeaurora.org>
diff --git a/drivers/video/msm/mdss/mdss_mdp_ctl.c b/drivers/video/msm/mdss/mdss_mdp_ctl.c
index bce4248..9599ea5 100644
--- a/drivers/video/msm/mdss/mdss_mdp_ctl.c
+++ b/drivers/video/msm/mdss/mdss_mdp_ctl.c
@@ -588,6 +588,11 @@
 {
 	struct mdss_mdp_ctl *ctl;
 
+	if (!mixer || !mixer->ctl) {
+		pr_err("invalid ctl handle\n");
+		return -ENODEV;
+	}
+
 	ctl = mixer->ctl;
 	mixer->rotator_mode = 0;