From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D3CDC433FE for ; Wed, 23 Nov 2022 09:02:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236982AbiKWJCu (ORCPT ); Wed, 23 Nov 2022 04:02:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236983AbiKWJCp (ORCPT ); Wed, 23 Nov 2022 04:02:45 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A02B654A for ; Wed, 23 Nov 2022 01:02:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 283D4B81EEE for ; Wed, 23 Nov 2022 09:02:41 +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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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