]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ntfs: fix variable dereferenced before check ni in ntfs_attr_open()
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 6 May 2026 11:36:37 +0000 (20:36 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Fri, 8 May 2026 14:51:05 +0000 (23:51 +0900)
commitc37d9e68b6766f5e28057ee2ea3251b7ffe88e54
treecf9cf3edeabd2236ee68d610c1edf43deffa439f
parent11f7a6d9d722aeb889f6363e4d07e9f0c54f1be1
ntfs: fix variable dereferenced before check ni in ntfs_attr_open()

Smatch warnings:
 ntfs_attr_open() warn: variable dereferenced before check 'ni'

Moves the ntfs_debug() call after the NULL pointer checks to ensure safe
access to the structure members.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/ntfs/attrib.c