diff options
author | 2024-02-19 16:58:41 +0000 | |
---|---|---|
committer | 2024-02-19 16:58:41 +0000 | |
commit | d68ce3aa8142333a96a071a9a0207f21c04e54cc (patch) | |
tree | 15754707ec571eb08c8d6308fe2459e46b8a5468 /net/sctp/inqueue.c | |
parent | dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM6150 compatible (diff) | |
parent | Linux 6.8-rc5 (diff) | |
download | wireguard-linux-d68ce3aa8142333a96a071a9a0207f21c04e54cc.tar.xz wireguard-linux-d68ce3aa8142333a96a071a9a0207f21c04e54cc.zip |
regulator: Merge up v6.8-rc5
There are dependencies on the PWM fixes for some new work on the PWM
driver.
Diffstat (limited to 'net/sctp/inqueue.c')
-rw-r--r-- | net/sctp/inqueue.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c index 7182c5a450fb..5c1652181805 100644 --- a/net/sctp/inqueue.c +++ b/net/sctp/inqueue.c @@ -38,6 +38,14 @@ void sctp_inq_init(struct sctp_inq *queue) INIT_WORK(&queue->immediate, NULL); } +/* Properly release the chunk which is being worked on. */ +static inline void sctp_inq_chunk_free(struct sctp_chunk *chunk) +{ + if (chunk->head_skb) + chunk->skb = chunk->head_skb; + sctp_chunk_free(chunk); +} + /* Release the memory associated with an SCTP inqueue. */ void sctp_inq_free(struct sctp_inq *queue) { @@ -53,7 +61,7 @@ void sctp_inq_free(struct sctp_inq *queue) * free it as well. */ if (queue->in_progress) { - sctp_chunk_free(queue->in_progress); + sctp_inq_chunk_free(queue->in_progress); queue->in_progress = NULL; } } @@ -130,9 +138,7 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue) goto new_skb; } - if (chunk->head_skb) - chunk->skb = chunk->head_skb; - sctp_chunk_free(chunk); + sctp_inq_chunk_free(chunk); chunk = queue->in_progress = NULL; } else { /* Nothing to do. Next chunk in the packet, please. */ |