diff options
Diffstat (limited to 'arch/arm/plat-omap/iovmm.c')
-rw-r--r-- | arch/arm/plat-omap/iovmm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index 0ce36bbef9d2..577d8c03b8e1 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c | |||
@@ -617,7 +617,7 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt, | |||
617 | u32 flags) | 617 | u32 flags) |
618 | { | 618 | { |
619 | size_t bytes; | 619 | size_t bytes; |
620 | void *va; | 620 | void *va = NULL; |
621 | 621 | ||
622 | if (!obj || !obj->dev || !sgt) | 622 | if (!obj || !obj->dev || !sgt) |
623 | return -EINVAL; | 623 | return -EINVAL; |
@@ -627,9 +627,11 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt, | |||
627 | return -EINVAL; | 627 | return -EINVAL; |
628 | bytes = PAGE_ALIGN(bytes); | 628 | bytes = PAGE_ALIGN(bytes); |
629 | 629 | ||
630 | va = vmap_sg(sgt); | 630 | if (flags & IOVMF_MMIO) { |
631 | if (IS_ERR(va)) | 631 | va = vmap_sg(sgt); |
632 | return PTR_ERR(va); | 632 | if (IS_ERR(va)) |
633 | return PTR_ERR(va); | ||
634 | } | ||
633 | 635 | ||
634 | flags &= IOVMF_HW_MASK; | 636 | flags &= IOVMF_HW_MASK; |
635 | flags |= IOVMF_DISCONT; | 637 | flags |= IOVMF_DISCONT; |