summaryrefslogtreecommitdiffstats
path: root/fs/ksmbd/smb2pdu.c
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2021-07-07 07:55:31 +0200
committerNamjae Jeon <namjae.jeon@samsung.com>2021-07-08 08:46:07 +0200
commit6cfbcf2f40e371ce36c030addc539597d058b3a9 (patch)
treea859eea08c1233a507394b0352e3bccea7e67ab4 /fs/ksmbd/smb2pdu.c
parentksmbd: Fix read on the uninitialized pointer sess (diff)
downloadlinux-6cfbcf2f40e371ce36c030addc539597d058b3a9.tar.xz
linux-6cfbcf2f40e371ce36c030addc539597d058b3a9.zip
ksmbd: remove unneeded NULL check in for_each_netdev
netdev can never be NULL in for_each_netdev loop. This patch remove unneeded NULL check. Reported-by: Coverity Scan <scan-admin@coverity.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r--fs/ksmbd/smb2pdu.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index 994b95b6b3c2..2811dfabfa75 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -7004,11 +7004,6 @@ static int fsctl_query_iface_info_ioctl(struct ksmbd_conn *conn,
rtnl_lock();
for_each_netdev(&init_net, netdev) {
- if (unlikely(!netdev)) {
- rtnl_unlock();
- return -EINVAL;
- }
-
if (netdev->type == ARPHRD_LOOPBACK)
continue;