mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
gpu: ion: Free the sgtable for CMA based heaps
When an sgtable is allocated with sg_alloc_table, the table needs to be destroyed in addition to being freed. Destroy the sgtable when freeing the associated memory. Change-Id: Iedba81146ba453070790f071848f86826f7eec9c Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This commit is contained in:
parent
5e597b465b
commit
d5f76e2f05
1 changed files with 1 additions and 0 deletions
|
@ -115,6 +115,7 @@ static void ion_cma_free(struct ion_buffer *buffer)
|
|||
dev_dbg(dev, "Release buffer %p\n", buffer);
|
||||
/* release memory */
|
||||
dma_free_coherent(dev, buffer->size, info->cpu_addr, info->handle);
|
||||
sg_free_table(info->table);
|
||||
/* release sg table */
|
||||
kfree(info->table);
|
||||
kfree(info);
|
||||
|
|
Loading…
Reference in a new issue