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

Commit 5ba36a75 authored by Jayant Shekhar's avatar Jayant Shekhar
Browse files

msm: mdss: Fix potential pipe NULL pointer dereference



NULL pointer derefernce can happen with variable pipe
struct during pipe intialization. Fix this to add a
check for NULL pointer.

Change-Id: I3241ed89979deb777ca62d0c893afb96926820ee
Signed-off-by: default avatarJayant Shekhar <jshekhar@codeaurora.org>
parent 6bd9d495
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1129,7 +1129,7 @@ static struct mdss_mdp_pipe *mdss_mdp_pipe_init(struct mdss_mdp_mixer *mixer,

	for (i = off; i < npipes; i++) {
		pipe = pipe_pool + i;
		if (atomic_read(&pipe->kref.refcount) == 0) {
		if (pipe && atomic_read(&pipe->kref.refcount) == 0) {
			pipe->mixer_left = mixer;
			break;
		}