public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] arch/i386/kernel/io_apic.c: handle a negative return value
@ 2006-11-12 17:48 Adrian Bunk
  2006-11-13  8:08 ` Ingo Molnar
  2006-11-14  0:42 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian Bunk @ 2006-11-12 17:48 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

The Coverity checker noted that bad things might happen if 
find_isa_irq_apic() returned -1.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6/arch/i386/kernel/io_apic.c.old	2006-11-12 18:41:24.000000000 +0100
+++ linux-2.6/arch/i386/kernel/io_apic.c	2006-11-12 18:42:00.000000000 +0100
@@ -2160,7 +2160,8 @@ static inline void unlock_ExtINT_logic(v
 
 	pin  = find_isa_irq_pin(8, mp_INT);
 	apic = find_isa_irq_apic(8, mp_INT);
-	if (pin == -1)
+
+	if ((pin == -1) || (apic == -1))
 		return;
 
 	entry0 = ioapic_read_entry(apic, pin);


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-14  6:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-12 17:48 [2.6 patch] arch/i386/kernel/io_apic.c: handle a negative return value Adrian Bunk
2006-11-13  8:08 ` Ingo Molnar
2006-11-14  0:42 ` Andrew Morton
2006-11-14  6:46   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox