From: Dan Carpenter Date: Thu, 7 Jan 2016 09:36:06 +0000 (+0300) Subject: iommu/amd: Remove an unneeded condition X-Git-Tag: MMI-PSA29.97-13-9~8669^2^7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1fb260bc003d7c6196fc0ee3a169a2f6495d17fe;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 6f6502d9fd67..539b0dea8034 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;