Skip to content

Commit 5819477

Browse files
lxindavem330
authored andcommitted
sctp: remove useless err from sctp_association_init
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]>
1 parent 1511949 commit 5819477

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

net/sctp/associola.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
7171
{
7272
struct net *net = sock_net(sk);
7373
struct sctp_sock *sp;
74-
int i;
7574
sctp_paramhdr_t *p;
76-
int err;
75+
int i;
7776

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

265264
/* AUTH related initializations */
266265
INIT_LIST_HEAD(&asoc->endpoint_shared_keys);
267-
err = sctp_auth_asoc_copy_shkeys(ep, asoc, gfp);
268-
if (err)
266+
if (sctp_auth_asoc_copy_shkeys(ep, asoc, gfp))
269267
goto fail_init;
270268

271269
asoc->active_key_id = ep->active_key_id;

0 commit comments

Comments
 (0)