提交 f0e1761a 编写于 作者: C Cornelia Huck 提交者: Greg Kroah-Hartman

driver core fixes: sysfs_create_link() retval check in class.c

Check for return value of sysfs_create_link() in class_device_add().
Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 97a50184
......@@ -562,7 +562,10 @@ int class_device_add(struct class_device *class_dev)
goto out2;
/* add the needed attributes to this device */
sysfs_create_link(&class_dev->kobj, &parent_class->subsys.kset.kobj, "subsystem");
error = sysfs_create_link(&class_dev->kobj,
&parent_class->subsys.kset.kobj, "subsystem");
if (error)
goto out3;
class_dev->uevent_attr.attr.name = "uevent";
class_dev->uevent_attr.attr.mode = S_IWUSR;
class_dev->uevent_attr.attr.owner = parent_class->owner;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册