| Date | Wed, 07 May 2014 15:44:10 -0000 | From | Thomas Gleixner <> | Subject | [patch 11/32] iommu: dmar: Fix return value check of create_irq() |
| |
ia64 returns a negative error code when allocation fails andx86 returns 0. Make it handle both.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: x86@kernel.org Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: linux-ia64@vger.kernel.org Cc: Joerg Roedel <joro@8bytes.org> Cc: iommu@lists.linux-foundation.org --- drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Index: tip/drivers/iommu/dmar.c =================================================================== --- tip.orig/drivers/iommu/dmar.c +++ tip/drivers/iommu/dmar.c @@ -1551,7 +1551,7 @@ int dmar_set_interrupt(struct intel_iomm return 0; irq = create_irq(); - if (!irq) { + if (irq <= 0) { pr_err("IOMMU: no free vectors\n"); return -EINVAL; }
|