[PATCH 01/46] driver core: fix device_add error path

From: Greg Kroah-Hartman
Date: Fri Apr 27 2007 - 14:56:52 EST


From: Dmitriy Monakhov <dmonakhov@xxxxx>

- At the moment we jump here device was't added to
dev->class->devices list yet.

Signed-off-by: Monakhov Dmitriy <dmonakhov@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
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 d7fcf82..db3a151 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);
--
1.5.1.2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/