X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=blobdiff_plain;f=drivers%2Fpci%2Fhotplug%2Frpaphp_slot.c;h=ff2cbf0652d83879509fa45ed59d1d1c7f4c60b4;hp=2bbd87ef4cd2192bb0ee1bf1ab4527b4ffc7e6af;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hpb=e3f6fb6212a7102bdb56ba38fa1e98fe72950475 diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c index 2bbd87ef4..ff2cbf065 100644 --- a/drivers/pci/hotplug/rpaphp_slot.c +++ b/drivers/pci/hotplug/rpaphp_slot.c @@ -98,17 +98,6 @@ static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot) void dealloc_slot_struct(struct slot *slot) { - struct list_head *ln, *n; - - if (slot->dev_type == PCI_DEV) { - list_for_each_safe (ln, n, &slot->dev.pci_funcs) { - struct rpaphp_pci_func *func; - - func = list_entry(ln, struct rpaphp_pci_func, sibling); - kfree(func); - } - } - kfree(slot->hotplug_slot->info); kfree(slot->hotplug_slot->name); kfree(slot->hotplug_slot); @@ -211,7 +200,7 @@ int register_slot(struct slot *slot) if (is_registered(slot)) { /* should't be here */ err("register_slot: slot[%s] is already registered\n", slot->name); rpaphp_release_slot(slot->hotplug_slot); - return 1; + return -EAGAIN; } retval = pci_hp_register(slot->hotplug_slot); if (retval) { @@ -270,7 +259,7 @@ int rpaphp_set_attention_status(struct slot *slot, u8 status) /* status: LED_OFF or LED_ON */ rc = rtas_set_indicator(DR_INDICATOR, slot->index, status); - if (rc) + if (rc < 0) err("slot(name=%s location=%s index=0x%x) set attention-status(%d) failed! rc=0x%x\n", slot->name, slot->location, slot->index, status, rc);