[PATCH] x86/HPET: fix inverted return value check inarch_setup_hpet_msi()

From: Jan Beulich
Date: Fri Nov 02 2012 - 09:59:42 EST


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>

---
arch/x86/kernel/apic/io_apic.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

--- 3.7-rc3/arch/x86/kernel/apic/io_apic.c
+++ 3.7-rc3-x86-hpet-masking/arch/x86/kernel/apic/io_apic.c
@@ -3317,8 +3317,9 @@ int arch_setup_hpet_msi(unsigned int irq
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/