diff options
author | Dmitry Popov <ixaphire@qrator.net> | 2014-08-03 14:45:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-04 18:09:45 -0400 |
commit | 64a124edcc94011ce459f0b9bdf51e1783146712 (patch) | |
tree | 168eaa5250635689f376866f8294691864befee5 /net/ipv4 | |
parent | 06b47aac4924180d63aad50727a11230d876c348 (diff) |
tcp: md5: remove unneeded check in tcp_v4_parse_md5_keys
tcpm_key is an array inside struct tcp_md5sig, there is no need to check it
against NULL.
Signed-off-by: Dmitry Popov <ixaphire@qrator.net>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index d0ba39537d5c..992a1f926009 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1049,7 +1049,7 @@ static int tcp_v4_parse_md5_keys(struct sock *sk, char __user *optval, | |||
1049 | if (sin->sin_family != AF_INET) | 1049 | if (sin->sin_family != AF_INET) |
1050 | return -EINVAL; | 1050 | return -EINVAL; |
1051 | 1051 | ||
1052 | if (!cmd.tcpm_key || !cmd.tcpm_keylen) | 1052 | if (!cmd.tcpm_keylen) |
1053 | return tcp_md5_do_del(sk, (union tcp_md5_addr *)&sin->sin_addr.s_addr, | 1053 | return tcp_md5_do_del(sk, (union tcp_md5_addr *)&sin->sin_addr.s_addr, |
1054 | AF_INET); | 1054 | AF_INET); |
1055 | 1055 | ||