Commit 9ab2323c authored by Xin Long's avatar Xin Long Committed by David S. Miller

sctp: remove the left unnecessary check for chunk in sctp_renege_events

Commit fb234035 ("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: fb234035 ("sctp: remove the useless check in sctp_renege_events")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a16b8d0c
...@@ -968,9 +968,8 @@ static void sctp_renege_events(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, ...@@ -968,9 +968,8 @@ static void sctp_renege_events(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
needed); needed);
} }
if (chunk && freed >= needed) if (freed >= needed && sctp_ulpevent_idata(ulpq, chunk, gfp) <= 0)
if (sctp_ulpevent_idata(ulpq, chunk, gfp) <= 0) sctp_intl_start_pd(ulpq, gfp);
sctp_intl_start_pd(ulpq, gfp);
sk_mem_reclaim(asoc->base.sk); sk_mem_reclaim(asoc->base.sk);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment