diff options
| author | Benjamin Chan <bkchan@codeaurora.org> | 2016-12-15 13:46:42 -0500 |
|---|---|---|
| committer | Benjamin Chan <bkchan@codeaurora.org> | 2016-12-15 21:14:33 -0500 |
| commit | e5eb0d3aa6fe62ee437a2269a1802b1a72f61b75 (patch) | |
| tree | bad1f1c78c4d7e38626d10b8223a93d7142cae70 | |
| parent | 3162449f7d245d45f007d4ea3224576ddf1bcc63 (diff) | |
msm: mdss: Fix invalid dma attachment during fb shutdown
If DMA attachment fail during fb_mmap, all ION memory will get free. It
is necessary to reset the fbmem and fb_attachemnt pointer to NULL,
otherwise during shutdown will perform another free and causing issue.
CRs-Fixed: 1090244
Change-Id: I92affcf2ce039eecfc72b7c191e058f37815c726
Signed-off-by: Benjamin Chan <bkchan@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 98ca6c3da20b..152879a0d239 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -2082,6 +2082,10 @@ err_put: dma_buf_put(mfd->fbmem_buf); fb_mmap_failed: ion_free(mfd->fb_ion_client, mfd->fb_ion_handle); + mfd->fb_attachment = NULL; + mfd->fb_table = NULL; + mfd->fb_ion_handle = NULL; + mfd->fbmem_buf = NULL; return rc; } |
