amd_iommu_rlookup_table[devid] != NULL is already guaranteed by check_device
called before, it's fine to attach device at this point.

Signed-off-by: Vaughan Cao <vaughan....@oracle.com>
---
 drivers/iommu/amd_iommu.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index c949520..252851a 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3514,12 +3514,6 @@ int __init amd_iommu_init_passthrough(void)
                dev_data = get_dev_data(&dev->dev);
                dev_data->passthrough = true;
 
-               devid = get_device_id(&dev->dev);
-
-               iommu = amd_iommu_rlookup_table[devid];
-               if (!iommu)
-                       continue;
-
                attach_device(&dev->dev, pt_domain);
        }
 
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to