diff options
author | Hiroshi DOYU <hdoyu@nvidia.com> | 2012-01-16 11:00:20 +0200 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 01:37:53 -0700 |
commit | 40f1c41a1cd18232f1ffd3e91de9ba4b03912dd7 (patch) | |
tree | a8b1377516297656124e29332db77c9a6ca7c6b5 /drivers/gpu/ion | |
parent | c87ed843a8d69038b558385de9fd9952d41640d2 (diff) |
gpu: ion: Remove unnecessary error handling
Ion core takes care of the case failing allocaion. Remove unnecessary
code and obsolete comment.
Change-Id: I0a27f6697beb1b3e802275eb01bfdc4fc0ae3ae2
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/75533
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Rebase-Id: Ra9c26cb7d3d5adfb6194ca389338076e2fb66bcb
Diffstat (limited to 'drivers/gpu/ion')
-rw-r--r-- | drivers/gpu/ion/ion_iommu_heap.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/gpu/ion/ion_iommu_heap.c b/drivers/gpu/ion/ion_iommu_heap.c index 582146435644..691d8c7ba37f 100644 --- a/drivers/gpu/ion/ion_iommu_heap.c +++ b/drivers/gpu/ion/ion_iommu_heap.c @@ -164,10 +164,9 @@ static int iommu_heap_allocate(struct ion_heap *heap, struct ion_buffer *buf, len = round_up(len, PAGE_SIZE); da = gen_pool_alloc(h->pool, len); - if (!da) { - buf->priv_virt = (void *)ION_CARVEOUT_ALLOCATE_FAIL; + if (!da) return -ENOMEM; - } + buf->priv_virt = (void *)da; buf->size = len; @@ -200,16 +199,6 @@ static void iommu_heap_free(struct ion_buffer *buf) container_of(heap, struct ion_iommu_heap, heap); void *da = buf->priv_virt; - /* - * FIXME: - * Buf should not be in use. - * Forcibly remove iommu mappings, if any exists. - * Free physical pages here. - */ - - if (da == (void *)ION_CARVEOUT_ALLOCATE_FAIL) - return; - iommu_heap_unmap_dma(heap, buf); ion_buffer_free(buf); gen_pool_free(h->pool, (unsigned long)da, buf->size); |