From 030a80edba50dc802aa57e7fbab284fb91b302f4 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Thu, 21 Jun 2012 07:58:41 -0700 Subject: [PATCH] gpu: ion: Check return code of msm_allocate_iova_address In the IOMMU heap, the return value of msm_allocate_iova_address needs to be checked instead of the value of the iova address. Check the return value instead. Change-Id: I4554515d17c926a7dd738824aff21eb65d2ba56a Signed-off-by: Laura Abbott --- drivers/gpu/ion/ion_iommu_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/ion/ion_iommu_heap.c b/drivers/gpu/ion/ion_iommu_heap.c index 01d432d8c73..d0f101c9dc1 100644 --- a/drivers/gpu/ion/ion_iommu_heap.c +++ b/drivers/gpu/ion/ion_iommu_heap.c @@ -197,7 +197,7 @@ int ion_iommu_heap_map_iommu(struct ion_buffer *buffer, data->mapped_size, align, &data->iova_addr); - if (!data->iova_addr) + if (ret) goto out; domain = msm_get_iommu_domain(domain_num);