arm: dma-mapping: Add iova checks in arm_iommu_map_sg

In arm_iommu_map_sg(), will execute __alloc_iova() and
then use this returned iova to execute iommu_map_sg(),
when this iova is DMA_ERROR_CODE, the value is 0xffffffff,
pgsize will be zero and then issue happens.

For the DMA_ERROR_CODE iova value, should not be allowed
to map sg, add checks to avoid it.

Change-Id: Ic1620075080b88b4dbcff4f5a909dd8149b70507
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
1 file changed