]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/gadget/f_fs.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / drivers / usb / gadget / f_fs.c
index 7f445ec723bc9a8ff864fb45bd12086a4bdabe6d..1cbba70836bcd7c1516c21253b3a54dd24a5849a 100644 (file)
@@ -1063,13 +1063,9 @@ static int ffs_sb_fill(struct super_block *sb, void *_data, int silent)
                                  &simple_dir_operations,
                                  &simple_dir_inode_operations,
                                  &data->perms);
-       if (unlikely(!inode))
+       sb->s_root = d_make_root(inode);
+       if (unlikely(!sb->s_root))
                goto Enomem;
-       sb->s_root = d_alloc_root(inode);
-       if (unlikely(!sb->s_root)) {
-               iput(inode);
-               goto Enomem;
-       }
 
        /* EP0 file */
        if (unlikely(!ffs_sb_create_file(sb, "ep0", ffs,