Commit b66aeddb authored by Alexey Kodanev's avatar Alexey Kodanev Committed by Jakub Kicinski

sctp: remove unnecessary NULL check in sctp_ulpq_tail_event()

After commit 013b96ec ("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: default avatarAlexey Kodanev <aleksei.kodanev@bell-sw.com>
Reviewed-by: default avatarXin Long <lucien.xin@gmail.com>
Link: https://lore.kernel.org/r/20221019180735.161388-2-aleksei.kodanev@bell-sw.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6fdfdef7
...@@ -256,10 +256,7 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sk_buff_head *skb_list) ...@@ -256,10 +256,7 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sk_buff_head *skb_list)
return 1; return 1;
out_free: out_free:
if (skb_list) sctp_queue_purge_ulpevents(skb_list);
sctp_queue_purge_ulpevents(skb_list);
else
sctp_ulpevent_free(event);
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