[PATCH 3.12 118/155] iommu/core: Check for the right function pointer in iommu_map()

From: Jiri Slaby
Date: Tue Apr 07 2015 - 09:06:48 EST


From: Joerg Roedel <jroedel@xxxxxxx>

3.12-stable review patch. If anyone has any objections, please let me know.

===============

commit 9db4ad9183aad0e9567f6afb23db1bdc9aa6c2a9 upstream.

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

Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
---
drivers/iommu/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index fbe9ca734f8f..9d71a57c96b1 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -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;

--
2.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/