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);
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) {
/* 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);