From: Zhengchao Shao Date: Fri, 11 Nov 2022 01:47:34 +0000 (+0800) Subject: net: caif: fix double disconnect client in chnl_net_open() X-Git-Tag: v4.9.334~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=688a5d8ebd2cbfabdec0256eba2f0aa3e6a8bdc2;p=thirdparty%2Fkernel%2Fstable.git net: caif: fix double disconnect client in chnl_net_open() [ 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 --- diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 12063f3338972..1bfcfcb68a26b 100644 --- a/net/caif/chnl_net.c +++ b/net/caif/chnl_net.c @@ -316,9 +316,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; }