projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c84f151
)
ext4: fix potential unnitialized variable
author
Dan Carpenter
<dan.carpenter@linaro.org>
Wed, 17 Apr 2024 18:10:40 +0000
(21:10 +0300)
committer
Theodore Ts'o
<tytso@mit.edu>
Tue, 7 May 2024 19:44:40 +0000
(15:44 -0400)
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:
8016e29f4362
("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>
fs/ext4/mballoc.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ext4/mballoc.c
b/fs/ext4/mballoc.c
index ac0ee747f4b94dd86e068b87d9352d0bfedf244d..648989c125f2fefe98419f7528a92e5e3cce5c69 100644
(file)
--- a/
fs/ext4/mballoc.c
+++ b/
fs/ext4/mballoc.c
@@
-6126,6
+6126,7
@@
ext4_mb_new_blocks_simple(struct ext4_allocation_request *ar, int *errp)
ext4_mb_mark_bb(sb, block, 1, true);
ar->len = 1;
+ *errp = 0;
return block;
}