aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/symlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/symlink.c')
-rw-r--r--fs/sysfs/symlink.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index d056e9695cd6..4ce687f0b5d0 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -97,11 +97,13 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, const char
97 sysfs_link_sibling(sd); 97 sysfs_link_sibling(sd);
98 } 98 }
99 99
100 if (sysfs_addrm_finish(&acxt)) 100 if (!sysfs_addrm_finish(&acxt)) {
101 return 0; 101 error = -EEXIST;
102 goto out_put;
103 }
104
105 return 0;
102 106
103 error = -EEXIST;
104 /* fall through */
105 out_put: 107 out_put:
106 sysfs_put(target_sd); 108 sysfs_put(target_sd);
107 sysfs_put(sd); 109 sysfs_put(sd);