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

Commit 944d10a0 authored by Rajkumar Subbiah's avatar Rajkumar Subbiah
Browse files

msm: mdss: Fix potential dereferencing of null pointer



During atomic commit on a writeback panel, there is a possibility
of deferencing a NULL pointer if the configuration changes before
the commit. This change adds a NULL pointer check to avoid it.

Change-Id: I56d0efad40992b6f87c81e5eab93cf0f24f6f524
Signed-off-by: default avatarRajkumar Subbiah <rsubbia@codeaurora.org>
parent b81d100b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3268,6 +3268,10 @@ int mdss_fb_atomic_commit(struct fb_info *info,
				MSMFB_ATOMIC_COMMIT, true, false);
			if (mfd->panel.type == WRITEBACK_PANEL) {
				output_layer = commit_v1->output_layer;
				if (!output_layer) {
					pr_err("Output layer is null\n");
					goto end;
				}
				wb_change = !mdss_fb_is_wb_config_same(mfd,
						commit_v1->output_layer);
				if (wb_change) {