From e9f731c309e7dde7645e70b8e874d4cb74c805ec Mon Sep 17 00:00:00 2001 From: Siddhartha Agrawal Date: Mon, 23 Feb 2015 13:56:34 -0800 Subject: [PATCH] msm: mdss: Do not queue rotator if mixer is invalid Stop rotator queue if the left mixer is invalid. This avoids null pointer dereference related crashes seen during reboot testing. Change-Id: I8d7eee04cbe9a1b6b4fc2593fb1d836e7ef9c941 Signed-off-by: Siddhartha Agrawal --- drivers/video/fbdev/msm/mdss_mdp_rotator.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/video/fbdev/msm/mdss_mdp_rotator.c b/drivers/video/fbdev/msm/mdss_mdp_rotator.c index 56f359849849..7e5dbae9544d 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_rotator.c +++ b/drivers/video/fbdev/msm/mdss_mdp_rotator.c @@ -565,6 +565,11 @@ static int mdss_mdp_rotator_queue_sub(struct mdss_mdp_rotator_session *rot, pipe = rot_pipe->pipe; + if (!pipe->mixer_left) { + pr_debug("Mixer left is null\n"); + return -EINVAL; + } + orig_ctl = pipe->mixer_left->ctl; if (orig_ctl->shared_lock) mutex_lock(orig_ctl->shared_lock);