iommu/core: Check for the right function pointer in iommu_map()
authorJoerg Roedel <jroedel@suse.de>
Mon, 18 Aug 2014 22:19:26 +0000 (00:19 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 18 Aug 2014 22:19:26 +0000 (00:19 +0200)
Check for the ->map and not the ->unmap pointer.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c

index 1698360..ac4adb3 100644 (file)
@@ -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;