X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fpci%2Fhotplug%2Fpci_hotplug_core.c;h=c802f6270b8954d52eccfb9f938351319b21604a;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=906fd9b3fbd39e876e55918c7151b01244dee76c;hpb=e3f6fb6212a7102bdb56ba38fa1e98fe72950475;p=linux-2.6.git diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index 906fd9b3f..c802f6270 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c @@ -567,6 +567,11 @@ int pci_hp_register (struct hotplug_slot *slot) return -ENODEV; if ((slot->info == NULL) || (slot->ops == NULL)) return -EINVAL; + if (slot->release == NULL) { + dbg("Why are you trying to register a hotplug slot" + "without a proper release function?\n"); + return -EINVAL; + } kobject_set_name(&slot->kobj, "%s", slot->name); kobj_set_kset_s(slot, pci_hotplug_slots_subsys);