[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-aa5125a45568f8f666f6d2f224fe8ab261b1069e@git.kernel.org>
Date: Fri, 16 May 2014 06:33:29 -0700
From: tip-bot for Thomas Gleixner <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, grant.likely@...aro.org,
hpa@...or.com, mingo@...nel.org, joro@...tes.org,
peterz@...radead.org, tony.luck@...el.com, fenghua.yu@...el.com,
tglx@...utronix.de
Subject: [tip:irq/core] iommu: smar: Fix return value check of create_irq(
)
Commit-ID: aa5125a45568f8f666f6d2f224fe8ab261b1069e
Gitweb: http://git.kernel.org/tip/aa5125a45568f8f666f6d2f224fe8ab261b1069e
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Wed, 7 May 2014 15:44:10 +0000
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 16 May 2014 14:05:19 +0200
iommu: smar: 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@...utronix.de>
Reviewed-by: Grant Likely <grant.likely@...aro.org>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: x86@...nel.org
Acked-by: Joerg Roedel <joro@...tes.org>
Cc: linux-ia64@...r.kernel.org
Cc: iommu@...ts.linux-foundation.org
Link: http://lkml.kernel.org/r/20140507154336.178850165@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
drivers/iommu/dmar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 39f8b71..3ce1f62 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -1551,7 +1551,7 @@ int dmar_set_interrupt(struct intel_iommu *iommu)
return 0;
irq = create_irq();
- if (!irq) {
+ if (irq <= 0) {
pr_err("IOMMU: no free vectors\n");
return -EINVAL;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists