diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 01:02:04 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 01:02:04 -0400 |
commit | b2382b363df828f25e35ed8b70a3da33b29b2a64 (patch) | |
tree | 23aa2e70ba4650390c9281b3696172313bdb0f38 /drivers/base/class.c | |
parent | 1b5cca3a88b7682d538d129c25f0e3092613a243 (diff) | |
parent | 0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf (diff) | |
download | op-kernel-dev-b2382b363df828f25e35ed8b70a3da33b29b2a64.zip op-kernel-dev-b2382b363df828f25e35ed8b70a3da33b29b2a64.tar.gz |
Merge upstream into ieee80211.
Hand-fix merge conflict in drivers/usb/net/zd1201.c.
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r-- | drivers/base/class.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index 479c125..0154a16 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -299,6 +299,11 @@ static void class_dev_release(struct kobject * kobj) pr_debug("device class '%s': release.\n", cd->class_id); + if (cd->devt_attr) { + kfree(cd->devt_attr); + cd->devt_attr = NULL; + } + if (cls->release) cls->release(cd); else { @@ -591,11 +596,8 @@ void class_device_del(struct class_device *class_dev) if (class_dev->dev) sysfs_remove_link(&class_dev->kobj, "device"); - if (class_dev->devt_attr) { + if (class_dev->devt_attr) class_device_remove_file(class_dev, class_dev->devt_attr); - kfree(class_dev->devt_attr); - class_dev->devt_attr = NULL; - } class_device_remove_attrs(class_dev); kobject_hotplug(&class_dev->kobj, KOBJ_REMOVE); |