提交 1fb260bc 编写于 作者: D Dan Carpenter 提交者: Joerg Roedel

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 a639a8ee
...@@ -3857,11 +3857,9 @@ static struct irq_domain *get_irq_domain(struct irq_alloc_info *info) ...@@ -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_MSI:
case X86_IRQ_ALLOC_TYPE_MSIX: case X86_IRQ_ALLOC_TYPE_MSIX:
devid = get_device_id(&info->msi_dev->dev); devid = get_device_id(&info->msi_dev->dev);
if (devid >= 0) { iommu = amd_iommu_rlookup_table[devid];
iommu = amd_iommu_rlookup_table[devid]; if (iommu)
if (iommu) return iommu->msi_domain;
return iommu->msi_domain;
}
break; break;
default: default:
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册