mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
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@linutronix.de> Reviewed-by: Grant 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: Joerg 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.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
d07c9f1875
commit
aa5125a455
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue