Skip to content

Commit

Permalink
iommu/amd: Allow NULL pointer parameter for domain_flush_complete()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed Jul 13, 2016
1 parent c5b5da9 commit f1eae7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit f1eae7c

Please sign in to comment.