From ca0d4326b0eb6d0cdfb4762f8cb5287f96651b1c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 9 Sep 2024 15:50:23 +0000 Subject: [PATCH] ANDROID: Fix gki allmodconfig build errors in mptcp In commit e93fa44f0714 ("mptcp: fix duplicate data handling"), the logic could potentially end up testing the variable 'incr' without first setting it. clang properly catches this error, but gcc doesn't, and it's gone unnoticed upstream as well. Fix this up by initializing the variable, which resolves the build. Note that for GKI kernels, none of this matters as mptcp is not enabled for that build. Fixes: e93fa44f0714 ("mptcp: fix duplicate data handling") Change-Id: Ia619c1f9fed70f39b29cfdbd3143e0480fd2199d Signed-off-by: Greg Kroah-Hartman --- net/mptcp/subflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 8a0ef50c3..843c61ebd 100755 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -871,7 +871,7 @@ static void mptcp_subflow_discard_data(struct sock *ssk, struct sk_buff *skb, struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk); bool fin = TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN; struct tcp_sock *tp = tcp_sk(ssk); - u32 offset, incr, avail_len; + u32 offset, incr = 0, avail_len; offset = tp->copied_seq - TCP_SKB_CB(skb)->seq; if (WARN_ON_ONCE(offset > skb->len))