From 80b1ca674b081a28713d89cb4146a88e8e054dbb Mon Sep 17 00:00:00 2001 From: Jonathan Solnit <jsolnit@google.com> Date: Wed, 5 Apr 2017 21:11:55 -0700 Subject: [PATCH] BACKPORT: 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 Bug: 36251984 Change-Id: I36eb3ca12ae90789b2b63ddd6d9ed69517b2eb59 Signed-off-by: Benjamin Chan <bkchan@codeaurora.org> Signed-off-by: Jonathan Solnit <jsolnit@google.com> --- drivers/video/msm/mdss/mdss_fb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c index d5f306ecc8e2..656742d35968 100644 --- a/drivers/video/msm/mdss/mdss_fb.c +++ b/drivers/video/msm/mdss/mdss_fb.c @@ -1314,6 +1314,7 @@ static int mdss_fb_alloc_fb_ion_memory(struct msm_fb_data_type *mfd, fb_mmap_failed: ion_free(mfd->fb_ion_client, mfd->fb_ion_handle); + mfd->fb_ion_handle = NULL; return rc; } -- GitLab