From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754646AbbFTKIk (ORCPT ); Sat, 20 Jun 2015 06:08:40 -0400 Received: from terminus.zytor.com ([198.137.202.10]:57419 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbbFTKIc (ORCPT ); Sat, 20 Jun 2015 06:08:32 -0400 Date: Sat, 20 Jun 2015 03:07:55 -0700 From: tip-bot for Jiang Liu Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, bp@alien8.de, tglx@linutronix.de, mingo@kernel.org, sergey.senozhatsky@gmail.com, jiang.liu@linux.intel.com Reply-To: jiang.liu@linux.intel.com, sergey.senozhatsky@gmail.com, bp@alien8.de, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org In-Reply-To: <558447AF.30703@linux.intel.com> References: <558447AF.30703@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/apic] x86/hpet: Check for irq== 0 when allocating hpet MSI interrupts Git-Commit-ID: bafac298fb20e9ae1305c710d4fd8d20c5911afa 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: bafac298fb20e9ae1305c710d4fd8d20c5911afa Gitweb: http://git.kernel.org/tip/bafac298fb20e9ae1305c710d4fd8d20c5911afa Author: Jiang Liu AuthorDate: Sat, 20 Jun 2015 11:50:50 +0200 Committer: Thomas Gleixner CommitDate: Sat, 20 Jun 2015 12:00:58 +0200 x86/hpet: Check for irq==0 when allocating hpet MSI interrupts irq == 0 is not a valid irq for a irqdomain MSI allocation, but hpet code checks only for negative return values. Reported-by: Sergey Senozhatsky Cc: Borislav Petkov Link: http://lkml.kernel.org/r/558447AF.30703@linux.intel.com Signed-off-by: Thomas Gleixner --- arch/x86/kernel/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index e2449cf..c47aab3 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -578,7 +578,7 @@ static void hpet_msi_capability_lookup(unsigned int start_timer) continue; irq = hpet_assign_irq(hpet_domain, hdev, hdev->num); - if (irq < 0) + if (irq <= 0) continue; sprintf(hdev->name, "hpet%d", i); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/