diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2021-06-22 09:16:45 +0200 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2021-06-28 09:28:21 +0200 |
commit | 560ac05130696de2491881bbc2a5024c94bc3912 (patch) | |
tree | e3e216b99a493947fa9a0e70abc8a387dd281eee /fs/cifsd/smb2pdu.c | |
parent | ksmbd: use f_bsize instead of q->limits.logical_block_size (diff) | |
download | linux-560ac05130696de2491881bbc2a5024c94bc3912.tar.xz linux-560ac05130696de2491881bbc2a5024c94bc3912.zip |
ksmbd: remove unneeded NULL check in the list iterator
Remove unneeded NULL check in the list iterator. And use
list_for_each_entry_safe instead of list_for_each_safe.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r-- | fs/cifsd/smb2pdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifsd/smb2pdu.c b/fs/cifsd/smb2pdu.c index 341d51e711a5..bbb35e68abc4 100644 --- a/fs/cifsd/smb2pdu.c +++ b/fs/cifsd/smb2pdu.c @@ -76,7 +76,7 @@ struct channel *lookup_chann_list(struct ksmbd_session *sess, struct ksmbd_conn struct channel *chann; list_for_each_entry(chann, &sess->ksmbd_chann_list, chann_list) { - if (chann && chann->conn == conn) + if (chann->conn == conn) return chann; } |