summaryrefslogtreecommitdiffstats
path: root/net/sctp/stream.c
diff options
context:
space:
mode:
authorXin Long2017-11-26 13:16:06 +0100
committerDavid S. Miller2017-11-28 17:00:13 +0100
commit08f46070dde2a835a7a5bfd4c70372c27bff5d88 (patch)
tree0f6463fbe1e6355e3f6b372216f4b5f9b153ff30 /net/sctp/stream.c
parentlmc: Use memdup_user() as a cleanup (diff)
downloadkernel-qcow2-linux-08f46070dde2a835a7a5bfd4c70372c27bff5d88.tar.gz
kernel-qcow2-linux-08f46070dde2a835a7a5bfd4c70372c27bff5d88.tar.xz
kernel-qcow2-linux-08f46070dde2a835a7a5bfd4c70372c27bff5d88.zip
sctp: force SCTP_ERROR_INV_STRM with __u32 when calling sctp_chunk_fail
This patch is to force SCTP_ERROR_INV_STRM with right type to fit in sctp_chunk_fail to avoid the sparse error. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/stream.c')
-rw-r--r--net/sctp/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/stream.c b/net/sctp/stream.c
index a20145b3a949..76ea66be0bbe 100644
--- a/net/sctp/stream.c
+++ b/net/sctp/stream.c
@@ -64,7 +64,7 @@ static void sctp_stream_outq_migrate(struct sctp_stream *stream,
*/
/* Mark as failed send. */
- sctp_chunk_fail(ch, SCTP_ERROR_INV_STRM);
+ sctp_chunk_fail(ch, (__force __u32)SCTP_ERROR_INV_STRM);
if (asoc->peer.prsctp_capable &&
SCTP_PR_PRIO_ENABLED(ch->sinfo.sinfo_flags))
asoc->sent_cnt_removable--;