aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2014-05-07 15:44:10 +0000
committerThomas Gleixner <[email protected]>2014-05-16 14:05:19 +0200
commitaa5125a45568f8f666f6d2f224fe8ab261b1069e (patch)
tree4c3ffd6028e3611b8cb6bf7162861aab8dfb9394
parentd07c9f18756e8231909a9bbcbfa7502c60cbc810 (diff)
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 <[email protected]> Reviewed-by: Grant Likely <[email protected]> Cc: Tony Luck <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: [email protected] Acked-by: Joerg Roedel <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
-rw-r--r--drivers/iommu/dmar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 39f8b717fe84..3ce1f62a091f 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;
}