提交 00ed8e3d 编写于 作者: D Dmitriy Monakhov 提交者: Greg Kroah-Hartman

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: NMonakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c58b8e4a
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册