sctp: Remove superfluous test in sctp_ulpq_reasm_drain().
authorDavid Miller <davem@davemloft.net>
Thu, 11 Apr 2019 22:01:53 +0000 (15:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Apr 2019 04:33:31 +0000 (21:33 -0700)
Inside the loop, we always start with event non-NULL.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/ulpqueue.c

index 5dde92101743768e05682991759b5713ecbde906..0fecc1fb4ab7b013a7035ac3cdaa6f8b3bb72388 100644 (file)
@@ -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));