vserver 2.0 rc7
[linux-2.6.git] / drivers / pci / hotplug / pci_hotplug_core.c
index 906fd9b..c802f62 100644 (file)
@@ -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);