summaryrefslogtreecommitdiff
path: root/net/caif
diff options
context:
space:
mode:
authorZhengchao Shao <shaozhengchao@huawei.com>2022-11-11 04:47:34 +0300
committerDavid S. Miller <davem@davemloft.net>2022-11-14 13:51:13 +0300
commit8fbb53c8bfd8c56ecf1f78dc821778b58f505503 (patch)
tree476f1863bbf3c486f750df31578802c4ccc21c11 /net/caif
parent5df1341ea822292275c56744aab9c536d75c33be (diff)
downloadlinux-8fbb53c8bfd8c56ecf1f78dc821778b58f505503.tar.xz
net: caif: fix double disconnect client in chnl_net_open()
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 <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif')
-rw-r--r--net/caif/chnl_net.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
index 4d63ef13a1fd..f35fc87c453a 100644
--- a/net/caif/chnl_net.c
+++ b/net/caif/chnl_net.c
@@ -310,9 +310,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;
}