diff options
author | Dmitriy Monakhov <dmonakhov@sw.ru> | 2007-03-11 15:36:19 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 21:57:27 +0400 |
commit | 00ed8e3dda47f8421b11da17e353d7db8c878121 (patch) | |
tree | 61aed6bee2b8f791d0bce8713a3b9132ad4badb4 /drivers/base | |
parent | c58b8e4a25a1ba347a0e5d21984c97bd296f1691 (diff) | |
download | linux-00ed8e3dda47f8421b11da17e353d7db8c878121.tar.xz |
driver core: fix device_add error path
- At the moment we jump here device was't added to
dev->class->devices list yet.
Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index d7fcf823a42a..db3a151be4a1 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -677,15 +677,6 @@ int device_add(struct device *dev) #endif sysfs_remove_link(&dev->kobj, "device"); } - - down(&dev->class->sem); - /* notify any interfaces that the device is now gone */ - list_for_each_entry(class_intf, &dev->class->interfaces, node) - if (class_intf->remove_dev) - class_intf->remove_dev(dev, class_intf); - /* remove the device from the class list */ - list_del_init(&dev->node); - up(&dev->class->sem); } ueventattrError: device_remove_file(dev, &dev->uevent_attr); |