From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932301AbaEPNe1 (ORCPT ); Fri, 16 May 2014 09:34:27 -0400 Received: from terminus.zytor.com ([198.137.202.10]:54139 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932155AbaEPNeX (ORCPT ); Fri, 16 May 2014 09:34:23 -0400 Date: Fri, 16 May 2014 06:33:29 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: linux-kernel@vger.kernel.org, grant.likely@linaro.org, hpa@zytor.com, mingo@kernel.org, joro@8bytes.org, peterz@infradead.org, tony.luck@intel.com, fenghua.yu@intel.com, tglx@linutronix.de Reply-To: mingo@kernel.org, hpa@zytor.com, grant.likely@linaro.org, linux-kernel@vger.kernel.org, peterz@infradead.org, joro@8bytes.org, tony.luck@intel.com, fenghua.yu@intel.com, tglx@linutronix.de In-Reply-To: <20140507154336.178850165@linutronix.de> References: <20140507154336.178850165@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] iommu: smar: Fix return value check of create_irq( ) Git-Commit-ID: aa5125a45568f8f666f6d2f224fe8ab261b1069e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: aa5125a45568f8f666f6d2f224fe8ab261b1069e Gitweb: http://git.kernel.org/tip/aa5125a45568f8f666f6d2f224fe8ab261b1069e Author: Thomas Gleixner AuthorDate: Wed, 7 May 2014 15:44:10 +0000 Committer: Thomas Gleixner 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 Reviewed-by: Grant Likely Cc: Tony Luck Cc: Peter Zijlstra Cc: Fenghua Yu Cc: x86@kernel.org Acked-by: Joerg Roedel 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 --- 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; }