]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ntfs: Replace ERR_PTR(0) with NULL
authorEthan Tidmore <ethantidmore06@gmail.com>
Thu, 26 Feb 2026 04:03:54 +0000 (22:03 -0600)
committerNamjae Jeon <linkinjeon@kernel.org>
Thu, 26 Feb 2026 09:26:09 +0000 (18:26 +0900)
commitec8676c84f665257f4bf9349d4c12c05e09e31b3
treed2253b3c9569106040ab89f760089c5f94688694
parent9b4253cd63ac00f6944fa0ac58d981c21859db3b
ntfs: Replace ERR_PTR(0) with NULL

The variable err is confirmed to be 0 and then never reassigned in the
success path. The function then returns with ERR_PTR(err) which just
equals NULL and can be misleading.

Detected by Smatch:
fs/ntfs/namei.c:1091 ntfs_mkdir() warn:
passing zero to 'ERR_PTR'

Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/ntfs/namei.c