summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sctp/input.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 66038533ca5c..2a192a7c5d81 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -536,8 +536,7 @@ struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *skb,
return sk;
out:
- if (asoc)
- sctp_association_put(asoc);
+ sctp_association_put(asoc);
return NULL;
}
@@ -545,8 +544,7 @@ out:
void sctp_err_finish(struct sock *sk, struct sctp_association *asoc)
{
sctp_bh_unlock_sock(sk);
- if (asoc)
- sctp_association_put(asoc);
+ sctp_association_put(asoc);
}
/*