mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
sctp: remove the left unnecessary check for chunk in sctp_renege_events
Commitfb23403536("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:fb23403536("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]>
This commit is contained in:
1 parent
a16b8d0cf2
commit
9ab2323ca1
1 file changed
+2
-3
@@ -968,9 +968,8 @@ static void sctp_renege_events(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
|
||||
needed);
|
||||
}
|
||||
|
||||
if (chunk && freed >= needed)
|
||||
if (sctp_ulpevent_idata(ulpq, chunk, gfp) <= 0)
|
||||
sctp_intl_start_pd(ulpq, gfp);
|
||||
if (freed >= needed && sctp_ulpevent_idata(ulpq, chunk, gfp) <= 0)
|
||||
sctp_intl_start_pd(ulpq, gfp);
|
||||
|
||||
sk_mem_reclaim(asoc->base.sk);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user