Patchwork [01/22] pc: Drop useless test from isa_irq_handler

login
register
mail settings
Submitter Jan Kiszka
Date Sept. 28, 2011, 11 a.m.
Message ID <467297c246c8e6687c51b844182844331187a85c.1317207666.git.jan.kiszka@siemens.com>
Download mbox | patch
Permalink /patch/116764/
State New
Headers show

Comments

Jan Kiszka - Sept. 28, 2011, 11 a.m.
IsaIrqState::ioapic is always non-NULL. Probably, the concrete
qemu_irq was supposed to be tested, but that's already done by
qemu_set_irq.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/pc.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/pc.c b/hw/pc.c
index 203627d..a15d165 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -96,9 +96,8 @@  void isa_irq_handler(void *opaque, int n, int level)
     if (n < 16) {
         qemu_set_irq(isa->i8259[n], level);
     }
-    if (isa->ioapic)
-        qemu_set_irq(isa->ioapic[n], level);
-};
+    qemu_set_irq(isa->ioapic[n], level);
+}
 
 static void ioport80_write(void *opaque, uint32_t addr, uint32_t data)
 {