Skip to content

Commit

Permalink
x86: hpet: Fix inverted return value check in arch_setup_hpet_msi()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Beulich authored and Thomas Gleixner committed Nov 2, 2012
1 parent 6acf5a8 commit 5074b85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5074b85

Please sign in to comment.