Commit c45f743a authored by Joerg Roedel's avatar Joerg Roedel Committed by Jiri Slaby

iommu/core: Check for the right function pointer in iommu_map()

commit 9db4ad91 upstream.

Check for the ->map and not the ->unmap pointer.
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent f22ce19a
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment