ksmbd: use list_first_entry_or_null for opinfo_get_list()
authorNamjae Jeon <linkinjeon@kernel.org>
Tue, 20 May 2025 00:25:03 +0000 (09:25 +0900)
committerSteve French <stfrench@microsoft.com>
Thu, 22 May 2025 03:30:39 +0000 (22:30 -0500)
commit10379171f346e6f61d30d9949500a8de4336444a
tree6f17911d23e9195a6fad75e826c85293f354403c
parent68477b5dc57108d4306c56b3842d6f80a8161f30
ksmbd: use list_first_entry_or_null for opinfo_get_list()

The list_first_entry() macro never returns NULL.  If the list is
empty then it returns an invalid pointer.  Use list_first_entry_or_null()
to check if the list is empty.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202505080231.7OXwq4Te-lkp@intel.com/
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/oplock.c