aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Kodanev <[email protected]>2022-10-19 21:07:34 +0300
committerJakub Kicinski <[email protected]>2022-10-20 21:43:10 -0700
commitb66aeddbe30c26e56e33c65a74d073dc319beed5 (patch)
tree4b3561fcd0b84a22b678bf0f4ae68b74296f9bad
parent6fdfdef7fdb57e6b9f768c9ca0718dcb5e727a85 (diff)
sctp: remove unnecessary NULL check in sctp_ulpq_tail_event()
After commit 013b96ec6461 ("sctp: Pass sk_buff_head explicitly to sctp_ulpq_tail_event().") there is one more unneeded check of skb_list for NULL. Detected using the static analysis tool - Svace. Signed-off-by: Alexey Kodanev <[email protected]> Reviewed-by: Xin Long <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--net/sctp/ulpqueue.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 24960dcb6a21..b05daafd369a 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -256,10 +256,7 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sk_buff_head *skb_list)
return 1;
out_free:
- if (skb_list)
- sctp_queue_purge_ulpevents(skb_list);
- else
- sctp_ulpevent_free(event);
+ sctp_queue_purge_ulpevents(skb_list);
return 0;
}