]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ntfs: fix uninitialized variables in ntfs_ea_set_wsl_inode()
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 10 Apr 2026 15:02:49 +0000 (00:02 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Sat, 18 Apr 2026 02:33:09 +0000 (11:33 +0900)
commitcd8d29c1b3c3397493115a9e919a806ea28aef05
tree4139ad80b2c16bb87feb27d9d06641ea40c4dc0a
parent545834ac412fb42d41a41442aee7998c1d2dcced
ntfs: fix uninitialized variables in ntfs_ea_set_wsl_inode()

Smatch reported uninitialized symbol warnings in ntfs_ea_set_wsl_inode()
and __ntfs_create(). In ntfs_ea_set_wsl_inode(), the err variable could be
returned without initialization if no flags are set and rdev is zero.
Additionally, ea_size might remain uninitialized from the caller's
perspective if no EA operations are performed. While these cases might not
be triggered under current logic, we initialize them to zero to satisfy
the static checker.

Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/ntfs/ea.c