Skip to content

Commit 9ca01c7

Browse files
committed
efivarfs: Drop redundant cleanup on fill_super() failure
Al points out that kill_sb() will be called if efivarfs_fill_super() fails and so there is no point in cleaning up the efivar entry list. Reported-by: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent f45812c commit 9ca01c7

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

fs/efivarfs/super.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,7 @@ static int efivarfs_fill_super(struct super_block *sb, struct fs_context *fc)
343343
if (err)
344344
return err;
345345

346-
err = efivar_init(efivarfs_callback, (void *)sb, true,
347-
&sfi->efivarfs_list);
348-
if (err)
349-
efivar_entry_iter(efivarfs_destroy, &sfi->efivarfs_list, NULL);
350-
351-
return err;
346+
return efivar_init(efivarfs_callback, sb, true, &sfi->efivarfs_list);
352347
}
353348

354349
static int efivarfs_get_tree(struct fs_context *fc)

0 commit comments

Comments
 (0)