summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorHiroshi DOYU <hdoyu@nvidia.com>2012-01-16 11:00:20 +0200
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-01-23 06:20:59 -0800
commit74d88a741acbdff2d7e1ad8f7e2d9f9f1fb29428 (patch)
treeb4c88791130d88d501cac84de48de776558c621c /drivers/gpu
parent5bb2e126b8063a680c149dc205fce4ac6def5695 (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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/ion/ion_iommu_heap.c15
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);