diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2024-02-24 18:45:41 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2024-02-25 09:43:38 +0100 |
commit | 9ca01c7adf3993044f59934082087ebb9f7df6d5 (patch) | |
tree | 3ebde3654d154e3d62f85476d1b8de2953d745a9 /fs | |
parent | f45812cc23fb74bef62d4eb8a69fe7218f4b9f2a (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/efivarfs/super.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index 6038dd39367a..210daac79748 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c @@ -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) |