mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-16 19:04:41 +08:00
ext4: fix potential unnitialized variable
[ Upstream commit3f4830abd2
] 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:8016e29f43
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5267b649a9
commit
3ae762f26b
@ -5684,6 +5684,7 @@ ext4_mb_new_blocks_simple(struct ext4_allocation_request *ar, int *errp)
|
||||
ext4_mb_mark_bb(sb, block, 1, 1);
|
||||
ar->len = 1;
|
||||
|
||||
*errp = 0;
|
||||
return block;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user