aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDmitriy Monakhov <dmonakhov@sw.ru>2007-03-11 08:36:19 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 13:57:27 -0400
commit00ed8e3dda47f8421b11da17e353d7db8c878121 (patch)
tree61aed6bee2b8f791d0bce8713a3b9132ad4badb4 /drivers
parentc58b8e4a25a1ba347a0e5d21984c97bd296f1691 (diff)
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')
-rw-r--r--drivers/base/core.c9
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)
677#endif 677#endif
678 sysfs_remove_link(&dev->kobj, "device"); 678 sysfs_remove_link(&dev->kobj, "device");
679 } 679 }
680
681 down(&dev->class->sem);
682 /* notify any interfaces that the device is now gone */
683 list_for_each_entry(class_intf, &dev->class->interfaces, node)
684 if (class_intf->remove_dev)
685 class_intf->remove_dev(dev, class_intf);
686 /* remove the device from the class list */
687 list_del_init(&dev->node);
688 up(&dev->class->sem);
689 } 680 }
690 ueventattrError: 681 ueventattrError:
691 device_remove_file(dev, &dev->uevent_attr); 682 device_remove_file(dev, &dev->uevent_attr);