Commit 9ca01c7a authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

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: default avatarAlexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent f45812cc
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -343,12 +343,7 @@ static int efivarfs_fill_super(struct super_block *sb, struct fs_context *fc)
	if (err)
		return err;

	err = efivar_init(efivarfs_callback, (void *)sb, true,
			  &sfi->efivarfs_list);
	if (err)
		efivar_entry_iter(efivarfs_destroy, &sfi->efivarfs_list, NULL);

	return err;
	return efivar_init(efivarfs_callback, sb, true, &sfi->efivarfs_list);
}

static int efivarfs_get_tree(struct fs_context *fc)