ChangeSet 1.869, 2002/12/12 09:38:05-08:00, greg@kroah.com [PATCH] Driver core: Fix class leak in class_hotplug. Thanks to Pat Mochel for pointing this out to me. diff -Nru a/drivers/base/hotplug.c b/drivers/base/hotplug.c --- a/drivers/base/hotplug.c Fri Dec 13 17:19:08 2002 +++ b/drivers/base/hotplug.c Fri Dec 13 17:19:08 2002 @@ -149,6 +149,7 @@ int class_hotplug (struct device *dev, const char *action) { struct device_class * cls; + int retval; pr_debug ("%s\n", __FUNCTION__); @@ -162,5 +163,9 @@ if (!cls) return -ENODEV; - return do_hotplug (dev, cls->name, action, cls->hotplug); + retval = do_hotplug (dev, cls->name, action, cls->hotplug); + + put_devclass(cls); + + return retval; }