Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5818
b: refs/heads/master
c: 208f3d6
h: refs/heads/master
v: v3
  • Loading branch information
Maneesh Soni authored and Linus Torvalds committed Aug 17, 2005
1 parent 4497c62 commit c308189
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12aaa0855b39b5464db953fedf399fa91ee365ed
refs/heads/master: 208f3d6175cb17772c5af202fe12373f90894ff4
10 changes: 6 additions & 4 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c308189

Please sign in to comment.