From: tip-bot for Jan Beulich <JBeulich@suse.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
dwmw2@infradead.org, jbeulich@suse.com, JBeulich@suse.com,
tglx@linutronix.de
Subject: [tip:x86/timers] x86: hpet: Fix inverted return value check in arch_setup_hpet_msi()
Date: Fri, 2 Nov 2012 15:02:37 -0700 [thread overview]
Message-ID: <tip-5074b85bdd3a464efe7b6de2ec163f4c07696a20@git.kernel.org> (raw)
In-Reply-To: <5093E00D02000078000A60E2@nat28.tlf.novell.com>
Commit-ID: 5074b85bdd3a464efe7b6de2ec163f4c07696a20
Gitweb: http://git.kernel.org/tip/5074b85bdd3a464efe7b6de2ec163f4c07696a20
Author: Jan Beulich <JBeulich@suse.com>
AuthorDate: Fri, 2 Nov 2012 14:00:29 +0000
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 2 Nov 2012 22:53:27 +0100
x86: hpet: Fix inverted return value check in arch_setup_hpet_msi()
setup_hpet_msi_remapped() returns a negative error indicator on error
- check for this rather than for a boolean false indication, and pass
on that error code rather than a meaningless "-1".
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Link: http://lkml.kernel.org/r/5093E00D02000078000A60E2@nat28.tlf.novell.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/apic/io_apic.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 1817fa9..b134f0b 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3317,8 +3317,9 @@ int arch_setup_hpet_msi(unsigned int irq, unsigned int id)
int ret;
if (irq_remapping_enabled) {
- if (!setup_hpet_msi_remapped(irq, id))
- return -1;
+ ret = setup_hpet_msi_remapped(irq, id);
+ if (ret)
+ return ret;
}
ret = msi_compose_msg(NULL, irq, &msg, id);
prev parent reply other threads:[~2012-11-02 22:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-02 14:00 [PATCH] x86/HPET: fix inverted return value check in arch_setup_hpet_msi() Jan Beulich
2012-11-02 22:02 ` tip-bot for Jan Beulich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-5074b85bdd3a464efe7b6de2ec163f4c07696a20@git.kernel.org \
--to=jbeulich@suse.com \
--cc=dwmw2@infradead.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox