diff options
author | Eric Biggers <ebiggers@google.com> | 2019-01-10 12:18:02 -0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-01-18 18:43:43 +0800 |
commit | 6d0d6cfb12e5e1e8d879996b786da718c6ec15e6 (patch) | |
tree | 0bdca58a9e5078c24346a03bf969634ab05e8858 /crypto/af_alg.c | |
parent | 7c39edfb040078e1ab90e5c546cfeba8ec159bbd (diff) | |
download | linux-6d0d6cfb12e5e1e8d879996b786da718c6ec15e6.tar.gz linux-6d0d6cfb12e5e1e8d879996b786da718c6ec15e6.tar.bz2 linux-6d0d6cfb12e5e1e8d879996b786da718c6ec15e6.zip |
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/af_alg.c')
-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) if (err) goto unlock; - sk2->sk_family = PF_ALG; - if (nokey || !ask->refcnt++) sock_hold(sk); ask->nokey_refcnt += nokey; @@ -380,7 +378,6 @@ static int alg_create(struct net *net, struct socket *sock, int protocol, sock->ops = &alg_proto_ops; sock_init_data(sock, sk); - sk->sk_family = PF_ALG; sk->sk_destruct = alg_sock_destruct; return 0; |