@@ -3964,8 +3964,10 @@ int __mp_register_ioapic(int id, u32 address, u32 gsi_base, bool hotadd)
/* already registered ? */
idx = __mp_find_ioapic(gsi_base);
- if (idx >= 0)
+ if (idx >= 0) {
+ ret = -EEXIST;
goto out;
+ }
idx = find_first_zero_bit(ioapics_mask, MAX_IO_APICS);
if (idx >= MAX_IO_APICS) {
@@ -126,7 +126,8 @@ static void handle_ioapic_add(acpi_handle handle, struct pci_dev **pdev,
}
}
- if (acpi_register_ioapic(handle, res->start, gsi_base)) {
+ ret = acpi_register_ioapic(handle, res->start, gsi_base);
+ if (ret && ret != -EEXIST) {
if (dev)
goto exit_release;
return;