diff options
author | Eric Biggers <ebiggers@google.com> | 2019-01-10 15:18:02 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-01-18 05:43:43 -0500 |
commit | 6d0d6cfb12e5e1e8d879996b786da718c6ec15e6 (patch) | |
tree | 0bdca58a9e5078c24346a03bf969634ab05e8858 /crypto | |
parent | 7c39edfb040078e1ab90e5c546cfeba8ec159bbd (diff) |
crypto: af_alg - remove redundant initializations of sk_family
sk_alloc() already sets sock::sk_family to PF_ALG which is passed as the
'family' argument, so there's no need to set it again.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/af_alg.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 1dd573a44127..c5937c812799 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c | |||
@@ -302,8 +302,6 @@ int af_alg_accept(struct sock *sk, struct socket *newsock, bool kern) | |||
302 | if (err) | 302 | if (err) |
303 | goto unlock; | 303 | goto unlock; |
304 | 304 | ||
305 | sk2->sk_family = PF_ALG; | ||
306 | |||
307 | if (nokey || !ask->refcnt++) | 305 | if (nokey || !ask->refcnt++) |
308 | sock_hold(sk); | 306 | sock_hold(sk); |
309 | ask->nokey_refcnt += nokey; | 307 | ask->nokey_refcnt += nokey; |
@@ -380,7 +378,6 @@ static int alg_create(struct net *net, struct socket *sock, int protocol, | |||
380 | sock->ops = &alg_proto_ops; | 378 | sock->ops = &alg_proto_ops; |
381 | sock_init_data(sock, sk); | 379 | sock_init_data(sock, sk); |
382 | 380 | ||
383 | sk->sk_family = PF_ALG; | ||
384 | sk->sk_destruct = alg_sock_destruct; | 381 | sk->sk_destruct = alg_sock_destruct; |
385 | 382 | ||
386 | return 0; | 383 | return 0; |