lkml.org 
[lkml]   [2014]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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;
}



\
 
 \ /
  Last update: 2014-05-07 18:21    [W:1.473 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site