diff options
| author | Rajkumar Subbiah <rsubbia@codeaurora.org> | 2017-05-15 15:17:14 -0400 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-05-16 03:11:13 -0700 |
| commit | ef8e3cd4588b5ae71b73a3aca751d59e882e6748 (patch) | |
| tree | 91c38deb17605b236fe48a0a660b45c34a893670 | |
| parent | 75a9d0fee5b264c89afdc8b155848625fcbe9ca0 (diff) | |
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: Rajkumar Subbiah <rsubbia@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index 4eca9cb39223..4a4409008432 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -3421,6 +3421,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) { |
