Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <aleksei.kodanev@bell-sw.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Link: https://lore.kernel.org/r/20221019180735.161388-2-aleksei.kodanev@bell-sw.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Alexey Kodanev and committed by
Jakub Kicinski
b66aeddb 6fdfdef7

+1 -4
+1 -4
net/sctp/ulpqueue.c
··· 256 256 return 1; 257 257 258 258 out_free: 259 - if (skb_list) 260 - sctp_queue_purge_ulpevents(skb_list); 261 - else 262 - sctp_ulpevent_free(event); 259 + sctp_queue_purge_ulpevents(skb_list); 263 260 264 261 return 0; 265 262 }