aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/sysfs.c')
-rw-r--r--fs/btrfs/sysfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index 300076e66765..04087c020845 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -212,14 +212,13 @@ int btrfs_sysfs_add_super(struct btrfs_fs_info *fs)
212 fs->super_kobj.kset = btrfs_kset; 212 fs->super_kobj.kset = btrfs_kset;
213 error = kobject_init_and_add(&fs->super_kobj, &btrfs_super_ktype, 213 error = kobject_init_and_add(&fs->super_kobj, &btrfs_super_ktype,
214 NULL, "%s", name); 214 NULL, "%s", name);
215 kfree(name);
215 if (error) 216 if (error)
216 goto fail; 217 goto fail;
217 218
218 kfree(name);
219 return 0; 219 return 0;
220 220
221fail: 221fail:
222 kfree(name);
223 printk(KERN_ERR "btrfs: sysfs creation for super failed\n"); 222 printk(KERN_ERR "btrfs: sysfs creation for super failed\n");
224 return error; 223 return error;
225} 224}