]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ntfs3: avoid another -Wmaybe-uninitialized warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 15 May 2026 09:09:50 +0000 (11:09 +0200)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 2 Jun 2026 15:02:38 +0000 (17:02 +0200)
commit1bf15dd17385e3730521d17e9e158c475cd7474b
treedd91d8b3e34518512b742d7c0463a88808a3fba4
parent70d3855594cf6e8791970714b65cac3202d6160e
ntfs3: avoid another -Wmaybe-uninitialized warning

The ntfs3 specific -Wmaybe-uninitialized flag found one more false-postive,
this time with gcc-10 on s390:

fs/ntfs3/frecord.c: In function 'ni_expand_list':
fs/ntfs3/frecord.c:1370:16: error: 'ins_attr' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Add an explicit NULL pointer check before using the pointer, and
initialize it to NULL.

Fixes: 48d9b57b169f ("fs/ntfs3: add a subset of W=1 warnings for stricter checks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/frecord.c