summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel-iommu.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2019-06-11 20:28:45 -0400
committerJoerg Roedel <jroedel@suse.de>2019-06-12 04:36:59 -0400
commitf4c63ea91c6f6d9a1a3062071ff6cc4910ebb8a9 (patch)
tree4d6e34103ce76a8d63b5d4410d55b8f413ab49c9 /drivers/iommu/intel-iommu.c
parent1c5c59fbad20a63954de07687e4a29af18d1be12 (diff)
iommu/vt-d: Don't return error when device gets right domain
If a device gets a right domain in add_device ops, it shouldn't return error. Fixes: 942067f1b6b97 ("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>
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r--drivers/iommu/intel-iommu.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 10bdf7ea9564..60ec58bf6701 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -5388,10 +5388,7 @@ static int intel_iommu_add_device(struct device *dev)
5388 domain_add_dev_info(si_domain, dev); 5388 domain_add_dev_info(si_domain, dev);
5389 dev_info(dev, 5389 dev_info(dev,
5390 "Device uses a private identity domain.\n"); 5390 "Device uses a private identity domain.\n");
5391 return 0;
5392 } 5391 }
5393
5394 return -ENODEV;
5395 } 5392 }
5396 } else { 5393 } else {
5397 if (device_def_domain_type(dev) == IOMMU_DOMAIN_DMA) { 5394 if (device_def_domain_type(dev) == IOMMU_DOMAIN_DMA) {
@@ -5406,10 +5403,7 @@ static int intel_iommu_add_device(struct device *dev)
5406 5403
5407 dev_info(dev, 5404 dev_info(dev,
5408 "Device uses a private dma domain.\n"); 5405 "Device uses a private dma domain.\n");
5409 return 0;
5410 } 5406 }
5411
5412 return -ENODEV;
5413 } 5407 }
5414 } 5408 }
5415 5409