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 | bfb6090cb2247cfc6c750226a522a46e4f7ac5e2 (patch) | |
tree | e49a1d39c4d9f8efa61efdc5f4a715717dbc5d21 /crypto | |
parent | 3a955d63b2fd87c3029ab83b65cd24762ff9ba01 (diff) | |
download | linux-crypto-bfb6090cb2247cfc6c750226a522a46e4f7ac5e2.tar.gz linux-crypto-bfb6090cb2247cfc6c750226a522a46e4f7ac5e2.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')
-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 1dd573a4..c5937c81 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; |