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 <agrawals@codeaurora.org>
This commit is contained in:
Siddhartha Agrawal 2015-02-23 13:56:34 -08:00 committed by David Keitel
parent 2e9714f338
commit e9f731c309

View file

@ -565,6 +565,11 @@ static int mdss_mdp_rotator_queue_sub(struct mdss_mdp_rotator_session *rot,
pipe = rot_pipe->pipe; pipe = rot_pipe->pipe;
if (!pipe->mixer_left) {
pr_debug("Mixer left is null\n");
return -EINVAL;
}
orig_ctl = pipe->mixer_left->ctl; orig_ctl = pipe->mixer_left->ctl;
if (orig_ctl->shared_lock) if (orig_ctl->shared_lock)
mutex_lock(orig_ctl->shared_lock); mutex_lock(orig_ctl->shared_lock);