x86/ioapic: do not use assignment in if condition
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 x86/ioapic: do not use assignment in if condition
Fixes the following checkpatch errors:
ERROR: do not use assignment in if condition
Signed-off-by Ran Sun <[email protected]>
--- arch/x86/kernel/apic/io_apic.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
arch/x86/kernel/apic/io_apic.c +5 -2
@@ -1058,8 +1058,11 @@ static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapic, int pin,if (legacy) irq =alloc_isa_irq_from_domain (domain, irq, ioapic, pin, &tmp); -else if ((irq =irq_find_mapping (domain, pin)) ==0 ) - irq =alloc_irq_from_domain (domain, ioapic, gsi, &tmp); +else { + irq =irq_find_mapping (domain, pin); +if (irq ==0 ) + irq =alloc_irq_from_domain (domain, ioapic, gsi, &tmp); + } else if (!mp_check_pin_attr(irq, &tmp)) irq = -EBUSY ;if (irq >=0 ) {