Skip to content

Commit

Permalink
iommu/amd: Remove duplicate checking code
Browse files Browse the repository at this point in the history
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@oracle.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Vaughan Cao authored and Joerg Roedel committed May 26, 2014
1 parent e79df31 commit ecef115
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit ecef115

Please sign in to comment.