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>
This commit is contained in:
Benjamin Chan 2016-12-15 13:46:42 -05:00
parent 3162449f7d
commit e5eb0d3aa6

View file

@ -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;
}