net: caif: fix double disconnect client in chnl_net_open()

[ Upstream commit 8fbb53c8bf ]

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

Fixes: 2aa40aef9d ("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>
This commit is contained in:
Zhengchao Shao 2022-11-11 09:47:34 +08:00 коммит произвёл Greg Kroah-Hartman
Родитель 6d24034160
Коммит b88713d92b
1 изменённых файлов: 0 добавлений и 3 удалений

Просмотреть файл

@ -310,9 +310,6 @@ static int chnl_net_open(struct net_device *dev)
if (result == 0) { if (result == 0) {
pr_debug("connect timeout\n"); pr_debug("connect timeout\n");
caif_disconnect_client(dev_net(dev), &priv->chnl);
priv->state = CAIF_DISCONNECTED;
pr_debug("state disconnected\n");
result = -ETIMEDOUT; result = -ETIMEDOUT;
goto error; goto error;
} }