PCI Hotplug: enforce the rule that a hotplug slot needs a release function.
ChangeSet 1.2181.16.17, 2005/03/21 22:55:26-08:00, [EMAIL PROTECTED] PCI Hotplug: enforce the rule that a hotplug slot needs a release function. Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> drivers/pci/hotplug/pci_hotplug_core.c |5 + 1 files changed, 5 insertions(+) diff -Nru a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c --- a/drivers/pci/hotplug/pci_hotplug_core.c2005-04-01 15:34:15 -08:00 +++ b/drivers/pci/hotplug/pci_hotplug_core.c2005-04-01 15:34:15 -08:00 @@ -567,6 +567,11 @@ 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(>kobj, "%s", slot->name); kobj_set_kset_s(slot, pci_hotplug_slots_subsys); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
PCI Hotplug: enforce the rule that a hotplug slot needs a release function.
ChangeSet 1.2181.16.17, 2005/03/21 22:55:26-08:00, [EMAIL PROTECTED] PCI Hotplug: enforce the rule that a hotplug slot needs a release function. Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED] drivers/pci/hotplug/pci_hotplug_core.c |5 + 1 files changed, 5 insertions(+) diff -Nru a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c --- a/drivers/pci/hotplug/pci_hotplug_core.c2005-04-01 15:34:15 -08:00 +++ b/drivers/pci/hotplug/pci_hotplug_core.c2005-04-01 15:34:15 -08:00 @@ -567,6 +567,11 @@ 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); - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/