Skip to content
Commit c877154d authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Richard Weinberger
Browse files

ubifs: Fix uninitialized variable in search_dh_cookie()



fs/ubifs/tnc.c: In function ‘search_dh_cookie’:
fs/ubifs/tnc.c:1893: warning: ‘err’ is used uninitialized in this function

Indeed, err is always used uninitialized.

According to an original review comment from Hyunchul, acknowledged by
Richard, err should be initialized to -ENOENT to avoid the first call to
tnc_next().  But we can achieve the same by reordering the code.

Fixes: 781f675e ("ubifs: Fix unlink code wrt. double hash lookups")
Reported-by: default avatarHyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent a8750ddc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment