diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-01-07 09:36:06 (GMT) |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-01-07 12:08:07 (GMT) |
commit | 1fb260bc003d7c6196fc0ee3a169a2f6495d17fe (patch) | |
tree | 8d93faf7c91cd42fda93a90e92c73c884a4f2fe9 | |
parent | a639a8eecf2be962b5dcd38dedd8b6bd10c2354b (diff) | |
download | linux-1fb260bc003d7c6196fc0ee3a169a2f6495d17fe.tar.xz |
iommu/amd: Remove an unneeded condition
get_device_id() returns an unsigned short device id. It never fails and
it never returns a negative so we can remove this condition.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/amd_iommu.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 6f6502d..539b0de 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -3857,11 +3857,9 @@ static struct irq_domain *get_irq_domain(struct irq_alloc_info *info) case X86_IRQ_ALLOC_TYPE_MSI: case X86_IRQ_ALLOC_TYPE_MSIX: devid = get_device_id(&info->msi_dev->dev); - if (devid >= 0) { - iommu = amd_iommu_rlookup_table[devid]; - if (iommu) - return iommu->msi_domain; - } + iommu = amd_iommu_rlookup_table[devid]; + if (iommu) + return iommu->msi_domain; break; default: break; |