From ecef115d4540e3ef73551a21fb0622270a825110 Mon Sep 17 00:00:00 2001 From: Vaughan Cao Date: Fri, 16 May 2014 15:39:40 +0800 Subject: [PATCH] iommu/amd: Remove duplicate checking code 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 Signed-off-by: Joerg Roedel --- 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 57068e8035b5..bd8003d975bb 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); }