Skip to content

Commit

Permalink
iommu/vt-d: Don't return error when device gets right domain
Browse files Browse the repository at this point in the history
If a device gets a right domain in add_device ops, it shouldn't
return error.

Fixes: 942067f ("iommu/vt-d: Identify default domains replaced with private")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Lu Baolu authored and Joerg Roedel committed Jun 12, 2019
1 parent 1c5c59f commit f4c63ea
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5388,10 +5388,7 @@ static int intel_iommu_add_device(struct device *dev)
domain_add_dev_info(si_domain, dev);
dev_info(dev,
"Device uses a private identity domain.\n");
return 0;
}

return -ENODEV;
}
} else {
if (device_def_domain_type(dev) == IOMMU_DOMAIN_DMA) {
Expand All @@ -5406,10 +5403,7 @@ static int intel_iommu_add_device(struct device *dev)

dev_info(dev,
"Device uses a private dma domain.\n");
return 0;
}

return -ENODEV;
}
}

Expand Down

0 comments on commit f4c63ea

Please sign in to comment.