From: David Miller Date: Thu, 11 Apr 2019 22:01:53 +0000 (-0700) Subject: sctp: Remove superfluous test in sctp_ulpq_reasm_drain(). X-Git-Tag: v5.2-rc1~133^2~190^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0eff1052438c360c21aef01cc689ef54ee528af7;p=thirdparty%2Fkernel%2Flinux.git sctp: Remove superfluous test in sctp_ulpq_reasm_drain(). Inside the loop, we always start with event non-NULL. Signed-off-by: David S. Miller Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller --- diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index 5dde921017437..0fecc1fb4ab7b 100644 --- a/net/sctp/ulpqueue.c +++ b/net/sctp/ulpqueue.c @@ -745,7 +745,7 @@ static void sctp_ulpq_reasm_drain(struct sctp_ulpq *ulpq) while ((event = sctp_ulpq_retrieve_reassembled(ulpq)) != NULL) { /* Do ordering if needed. */ - if ((event) && (event->msg_flags & MSG_EOR)) { + if (event->msg_flags & MSG_EOR) { skb_queue_head_init(&temp); __skb_queue_tail(&temp, sctp_event2skb(event));