提交 aa5125a4 编写于 作者: T Thomas Gleixner

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: NThomas Gleixner <tglx@linutronix.de>
Reviewed-by: NGrant Likely <grant.likely@linaro.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: x86@kernel.org
Acked-by: NJoerg Roedel <joro@8bytes.org>
Cc: linux-ia64@vger.kernel.org
Cc: iommu@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/20140507154336.178850165@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 d07c9f18
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册