[PATCH] remove duplicate checking code

From: Vaughan Cao
Date: Fri May 16 2014 - 03:40:16 EST


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.cao@xxxxxxxxxx>
---
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/