Skip to content

Commit

Permalink
driver core fixes: sysfs_create_link() retval check in class.c
Browse files Browse the repository at this point in the history
Check for return value of sysfs_create_link() in class_device_add().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Cornelia Huck authored and Greg Kroah-Hartman committed Oct 18, 2006
1 parent 97a5018 commit f0e1761
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f0e1761

Please sign in to comment.