Skip to content

Commit

Permalink
net: caif: fix double disconnect client in chnl_net_open()
Browse files Browse the repository at this point in the history
[ Upstream commit 8fbb53c ]

When connecting to client timeout, disconnect client for twice in
chnl_net_open(). Remove one. Compile tested only.

Fixes: 2aa40ae ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
zhengchaoshao authored and gregkh committed Nov 26, 2022
1 parent 5826fe5 commit f0c13e6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/caif/chnl_net.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit f0c13e6

Please sign in to comment.