Skip to content

Commit 9ab2323

Browse files
lxindavem330
authored andcommitted
sctp: remove the left unnecessary check for chunk in sctp_renege_events
Commit fb23403 ("sctp: remove the useless check in sctp_renege_events") forgot to remove another check for chunk in sctp_renege_events. Dan found this when doing a static check. This patch is to remove that check, and also to merge two checks into one 'if statement'. Fixes: fb23403 ("sctp: remove the useless check in sctp_renege_events") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Xin Long <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a16b8d0 commit 9ab2323

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

net/sctp/stream_interleave.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,9 +968,8 @@ static void sctp_renege_events(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
968968
needed);
969969
}
970970

971-
if (chunk && freed >= needed)
972-
if (sctp_ulpevent_idata(ulpq, chunk, gfp) <= 0)
973-
sctp_intl_start_pd(ulpq, gfp);
971+
if (freed >= needed && sctp_ulpevent_idata(ulpq, chunk, gfp) <= 0)
972+
sctp_intl_start_pd(ulpq, gfp);
974973

975974
sk_mem_reclaim(asoc->base.sk);
976975
}

0 commit comments

Comments
 (0)