mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
[PATCH] i386: handle a negative return value
The Coverity checker noted that bad things might happen if find_isa_irq_apic() returned -1. [akpm@osdl.org: add debugging checks] Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@suse.de> Acked-by: Ingo Molnar <mingo@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
This commit is contained in:
parent
e1cccf48b1
commit
956fb53197
@ -2179,9 +2179,15 @@ static inline void unlock_ExtINT_logic(void)
|
||||
unsigned char save_control, save_freq_select;
|
||||
|
||||
pin = find_isa_irq_pin(8, mp_INT);
|
||||
apic = find_isa_irq_apic(8, mp_INT);
|
||||
if (pin == -1)
|
||||
if (pin == -1) {
|
||||
WARN_ON_ONCE(1);
|
||||
return;
|
||||
}
|
||||
apic = find_isa_irq_apic(8, mp_INT);
|
||||
if (apic == -1) {
|
||||
WARN_ON_ONCE(1);
|
||||
return;
|
||||
}
|
||||
|
||||
entry0 = ioapic_read_entry(apic, pin);
|
||||
clear_IO_APIC_pin(apic, pin);
|
||||
|
Loading…
Reference in New Issue
Block a user