Skip to content

Commit

Permalink
sctp: remove useless err from sctp_association_init
Browse files Browse the repository at this point in the history
This patch is to remove the unnecessary temporary variable 'err' from
sctp_association_init.

Signed-off-by: Xin Long <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lxin authored and davem330 committed Mar 22, 2017
1 parent 1511949 commit 5819477
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/sctp/associola.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
{
struct net *net = sock_net(sk);
struct sctp_sock *sp;
int i;
sctp_paramhdr_t *p;
int err;
int i;

/* Retrieve the SCTP per socket area. */
sp = sctp_sk((struct sock *)sk);
Expand Down Expand Up @@ -264,8 +263,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a

/* AUTH related initializations */
INIT_LIST_HEAD(&asoc->endpoint_shared_keys);
err = sctp_auth_asoc_copy_shkeys(ep, asoc, gfp);
if (err)
if (sctp_auth_asoc_copy_shkeys(ep, asoc, gfp))
goto fail_init;

asoc->active_key_id = ep->active_key_id;
Expand Down

0 comments on commit 5819477

Please sign in to comment.