Commit 8e62c731 authored by Maneesh Soni's avatar Maneesh Soni Committed by Greg Kroah-Hartman

[PATCH] sysfs: fix sysfs backing store error path confusion

o sysfs_new_dirent to retrun 0 if kmalloc fails. Thanks to Milton Miller
  for spotting this.
Signed-off-by: default avatarManeesh Soni <maneesh@in.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 0a266a89
......@@ -56,7 +56,7 @@ int sysfs_make_dirent(struct sysfs_dirent * parent_sd, struct dentry * dentry,
sd = sysfs_new_dirent(parent_sd, element);
if (!sd)
return -ENOMEM;
return 0;
sd->s_mode = mode;
sd->s_type = type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment