Skip to content
Commit 41cb5369 authored by Tom Rix's avatar Tom Rix Committed by Greg Kroah-Hartman
Browse files

udf: initialize newblock to 0

commit 23970a1c

 upstream.

The clang build reports this error
fs/udf/inode.c:805:6: error: variable 'newblock' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (*err < 0)
            ^~~~~~~~
newblock is never set before error handling jump.
Initialize newblock to 0 and remove redundant settings.

Fixes: d8b39db5fab8 ("udf: Handle error when adding extent to a file")
Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Message-Id: <20221230175341.1629734-1-trix@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c74b1cd9
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