linux-stable/fs/udf
Tom Rix cf23c6e667 udf: initialize newblock to 0
commit 23970a1c94 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: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20221230175341.1629734-1-trix@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-23 10:48:12 +02:00
..
Kconfig
Makefile
balloc.c udf: Check consistency of Space Bitmap Descriptor 2023-09-23 10:47:59 +02:00
dir.c udf: Fix crash after seekdir 2021-11-26 11:36:23 +01:00
directory.c udf: Remove pointless union in udf_inode_info 2023-03-17 08:31:42 +01:00
ecma_167.h
file.c udf: Remove pointless union in udf_inode_info 2023-03-17 08:31:42 +01:00
ialloc.c udf: Remove pointless union in udf_inode_info 2023-03-17 08:31:42 +01:00
inode.c udf: initialize newblock to 0 2023-09-23 10:48:12 +02:00
lowlevel.c
misc.c udf: Remove pointless union in udf_inode_info 2023-03-17 08:31:42 +01:00
namei.c udf: Remove pointless union in udf_inode_info 2023-03-17 08:31:42 +01:00
osta_udf.h
partition.c udf: Remove pointless union in udf_inode_info 2023-03-17 08:31:42 +01:00
super.c udf: Preserve link count of system files 2023-03-17 08:31:42 +01:00
symlink.c udf: Remove pointless union in udf_inode_info 2023-03-17 08:31:42 +01:00
truncate.c udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size 2023-01-18 11:30:00 +01:00
udf_i.h udf: Preserve link count of system files 2023-03-17 08:31:42 +01:00
udf_sb.h udf: Define EFSCORRUPTED error code 2023-03-11 16:31:45 +01:00
udfdecl.h udf: convert inode stamps to timespec64 2018-06-27 13:58:00 +02:00
udfend.h
udftime.c udf: convert inode stamps to timespec64 2018-06-27 13:58:00 +02:00
unicode.c udf: Fix uninitialized array access for some pathnames 2023-08-30 16:31:42 +02:00