From: Joerg Roedel Date: Mon, 18 Aug 2014 22:19:26 +0000 (+0200) Subject: iommu/core: Check for the right function pointer in iommu_map() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9db4ad9183aad0e9567f6afb23db1bdc9aa6c2a9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git iommu/core: Check for the right function pointer in iommu_map() Check for the ->map and not the ->unmap pointer. Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 169836020208..ac4adb337038 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -995,7 +995,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova, size_t orig_size = size; int ret = 0; - if (unlikely(domain->ops->unmap == NULL || + if (unlikely(domain->ops->map == NULL || domain->ops->pgsize_bitmap == 0UL)) return -ENODEV;