]> git.hungrycats.org Git - linux/commitdiff
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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 9 Apr 2015 12:13:47 +0000 (14:13 +0200)
commit 9db4ad9183aad0e9567f6afb23db1bdc9aa6c2a9 upstream.

Check for the ->map and not the ->unmap pointer.

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

index fbe9ca734f8fe3839a30dcf805b159faad3cc225..9d71a57c96b14812b0fa35c34c19217fde0f1de7 100644 (file)
@@ -794,7 +794,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;