[tip:x86/timers] x86: hpet: Fix inverted return value check in arch_setup_hpet_msi()

From: tip-bot for Jan Beulich
Date: Fri Nov 02 2012 - 18:02:54 EST


Commit-ID: 5074b85bdd3a464efe7b6de2ec163f4c07696a20
Gitweb: http://git.kernel.org/tip/5074b85bdd3a464efe7b6de2ec163f4c07696a20
Author: Jan Beulich <JBeulich@xxxxxxxx>
AuthorDate: Fri, 2 Nov 2012 14:00:29 +0000
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
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@xxxxxxxx>
Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Link: http://lkml.kernel.org/r/5093E00D02000078000A60E2@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

---
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/