diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-18 22:14:39 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-18 22:14:39 -0400 |
commit | a3bc068022b968a3042b48eb9a8e8b0418fb9cdd (patch) | |
tree | 6bbc2806756924105802f4584157396fb98d282c /drivers/base | |
parent | 54cfb5aa0f4859bd38706eabe0118175780a542f (diff) | |
parent | 91aa9fb573fcc50bc74d5ee64c7e9b36131f1804 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/bus.c | 4 | ||||
-rw-r--r-- | drivers/base/class.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 96fe2f956754..ab53832d57e5 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -180,7 +180,9 @@ static ssize_t driver_bind(struct device_driver *drv, | |||
180 | up(&dev->sem); | 180 | up(&dev->sem); |
181 | put_device(dev); | 181 | put_device(dev); |
182 | } | 182 | } |
183 | return err; | 183 | if (err) |
184 | return err; | ||
185 | return count; | ||
184 | } | 186 | } |
185 | static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind); | 187 | static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind); |
186 | 188 | ||
diff --git a/drivers/base/class.c b/drivers/base/class.c index 479c12570881..0154a1623b21 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -299,6 +299,11 @@ static void class_dev_release(struct kobject * kobj) | |||
299 | 299 | ||
300 | pr_debug("device class '%s': release.\n", cd->class_id); | 300 | pr_debug("device class '%s': release.\n", cd->class_id); |
301 | 301 | ||
302 | if (cd->devt_attr) { | ||
303 | kfree(cd->devt_attr); | ||
304 | cd->devt_attr = NULL; | ||
305 | } | ||
306 | |||
302 | if (cls->release) | 307 | if (cls->release) |
303 | cls->release(cd); | 308 | cls->release(cd); |
304 | else { | 309 | else { |
@@ -591,11 +596,8 @@ void class_device_del(struct class_device *class_dev) | |||
591 | 596 | ||
592 | if (class_dev->dev) | 597 | if (class_dev->dev) |
593 | sysfs_remove_link(&class_dev->kobj, "device"); | 598 | sysfs_remove_link(&class_dev->kobj, "device"); |
594 | if (class_dev->devt_attr) { | 599 | if (class_dev->devt_attr) |
595 | class_device_remove_file(class_dev, class_dev->devt_attr); | 600 | class_device_remove_file(class_dev, class_dev->devt_attr); |
596 | kfree(class_dev->devt_attr); | ||
597 | class_dev->devt_attr = NULL; | ||
598 | } | ||
599 | class_device_remove_attrs(class_dev); | 601 | class_device_remove_attrs(class_dev); |
600 | 602 | ||
601 | kobject_hotplug(&class_dev->kobj, KOBJ_REMOVE); | 603 | kobject_hotplug(&class_dev->kobj, KOBJ_REMOVE); |