Commit 6d0d6cfb authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu

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: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 7c39edfb
...@@ -302,8 +302,6 @@ int af_alg_accept(struct sock *sk, struct socket *newsock, bool kern) ...@@ -302,8 +302,6 @@ int af_alg_accept(struct sock *sk, struct socket *newsock, bool kern)
if (err) if (err)
goto unlock; goto unlock;
sk2->sk_family = PF_ALG;
if (nokey || !ask->refcnt++) if (nokey || !ask->refcnt++)
sock_hold(sk); sock_hold(sk);
ask->nokey_refcnt += nokey; ask->nokey_refcnt += nokey;
...@@ -380,7 +378,6 @@ static int alg_create(struct net *net, struct socket *sock, int protocol, ...@@ -380,7 +378,6 @@ static int alg_create(struct net *net, struct socket *sock, int protocol,
sock->ops = &alg_proto_ops; sock->ops = &alg_proto_ops;
sock_init_data(sock, sk); sock_init_data(sock, sk);
sk->sk_family = PF_ALG;
sk->sk_destruct = alg_sock_destruct; sk->sk_destruct = alg_sock_destruct;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment