From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DFC81C26 for ; Wed, 23 Nov 2022 09:02:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CEC9C433D6; Wed, 23 Nov 2022 09:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669194159; bh=6MnciGkYB/sf7lslUDA3MLeb5qjpzsJJgXjqM3DgNbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C5ynV8+tocy4NokWUGYiOKeU0jY+uqKqUTMbtoiQFVRD4Y4ZhRIncxCaAVFYHbizQ v0uUAJ+EgSuBiTmDptzx1A7w8BIMv7V5ekBfTCzNPmDYpuemUFblEgWpNOPAgUzJpx naDwyVh9FdxaZFHyMoSvqwN7R8C8ZQTQ2FUp5/Fw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhengchao Shao , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 48/88] net: caif: fix double disconnect client in chnl_net_open() Date: Wed, 23 Nov 2022 09:50:45 +0100 Message-Id: <20221123084550.184582687@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221123084548.535439312@linuxfoundation.org> References: <20221123084548.535439312@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Zhengchao Shao [ Upstream commit 8fbb53c8bfd8c56ecf1f78dc821778b58f505503 ] When connecting to client timeout, disconnect client for twice in chnl_net_open(). Remove one. Compile tested only. Fixes: 2aa40aef9deb ("caif: Use link layer MTU instead of fixed MTU") Signed-off-by: Zhengchao Shao Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/caif/chnl_net.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 7f0d20b69289..6f56fda61409 100644 --- a/net/caif/chnl_net.c +++ b/net/caif/chnl_net.c @@ -315,9 +315,6 @@ static int chnl_net_open(struct net_device *dev) if (result == 0) { pr_debug("connect timeout\n"); - caif_disconnect_client(dev_net(dev), &priv->chnl); - priv->state = CAIF_DISCONNECTED; - pr_debug("state disconnected\n"); result = -ETIMEDOUT; goto error; } -- 2.35.1