Skip to content

Commit 3f4830a

Browse files
Dan Carpentertytso
authored andcommitted
ext4: fix potential unnitialized variable
Smatch complains "err" can be uninitialized in the caller. fs/ext4/indirect.c:349 ext4_alloc_branch() error: uninitialized symbol 'err'. Set the error to zero on the success path. Fixes: 8016e29 ("ext4: fast commit recovery path") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/363a4673-0fb8-4adf-b4fb-90a499077276@moroto.mountain Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent c84f151 commit 3f4830a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/ext4/mballoc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6126,6 +6126,7 @@ ext4_mb_new_blocks_simple(struct ext4_allocation_request *ar, int *errp)
61266126
ext4_mb_mark_bb(sb, block, 1, true);
61276127
ar->len = 1;
61286128

6129+
*errp = 0;
61296130
return block;
61306131
}
61316132

0 commit comments

Comments
 (0)