summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2016-07-06 12:50:35 +0200
committerJoerg Roedel <jroedel@suse.de>2016-07-13 12:48:35 +0200
commitf1eae7c58036b30d434d84a34c6c3154bfb5b496 (patch)
treeae5ffa0e215c2119e31a7be70592f90f80cc35b1
parentc5b5da9c79bb2d88fa3c5163ccf1a7a9e89cfa49 (diff)
downloadlwn-f1eae7c58036b30d434d84a34c6c3154bfb5b496.tar.gz
lwn-f1eae7c58036b30d434d84a34c6c3154bfb5b496.zip
iommu/amd: Allow NULL pointer parameter for domain_flush_complete()
If domain == NULL is passed to the function, it will queue a completion-wait command on all IOMMUs in the system. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/amd_iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 38f8a5e461fc..0884b126d932 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1177,7 +1177,7 @@ static void domain_flush_complete(struct protection_domain *domain)
int i;
for (i = 0; i < amd_iommus_present; ++i) {
- if (!domain->dev_iommu[i])
+ if (domain && !domain->dev_iommu[i])
continue;
/*