Skip to content

Commit f1eae7c

Browse files
committed
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>
1 parent c5b5da9 commit f1eae7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/amd_iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ static void domain_flush_complete(struct protection_domain *domain)
11771177
int i;
11781178

11791179
for (i = 0; i < amd_iommus_present; ++i) {
1180-
if (!domain->dev_iommu[i])
1180+
if (domain && !domain->dev_iommu[i])
11811181
continue;
11821182

11831183
/*

0 commit comments

Comments
 (0)