From patchwork Tue Nov 23 12:50:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Kerr X-Patchwork-Id: 12634139 X-Patchwork-Delegate: kuba@kernel.org 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 380E9C4332F for ; Tue, 23 Nov 2021 12:51:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236778AbhKWMyT (ORCPT ); Tue, 23 Nov 2021 07:54:19 -0500 Received: from pi.codeconstruct.com.au ([203.29.241.158]:55740 "EHLO codeconstruct.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236620AbhKWMyR (ORCPT ); Tue, 23 Nov 2021 07:54:17 -0500 Received: by codeconstruct.com.au (Postfix, from userid 10000) id E53C92029B; Tue, 23 Nov 2021 20:51:07 +0800 (AWST) From: Jeremy Kerr To: netdev@vger.kernel.org Cc: Jiri Slaby , Greg Kroah-Hartman , Matt Johnston , "David S. Miller" , Jakub Kicinski Subject: [PATCH net-next 3/3] mctp: serial: remove unnecessary ldisc data check Date: Tue, 23 Nov 2021 20:50:42 +0800 Message-Id: <20211123125042.2564114-4-jk@codeconstruct.com.au> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211123125042.2564114-1-jk@codeconstruct.com.au> References: <20211123125042.2564114-1-jk@codeconstruct.com.au> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Jiri assures me that a ldisc->open with tty->disc_data set should never happen, so this check doesn't do anything. Reported-by: Jiri Slaby Signed-off-by: Jeremy Kerr --- drivers/net/mctp/mctp-serial.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/mctp/mctp-serial.c b/drivers/net/mctp/mctp-serial.c index 5687ad3220cd..9919a4734ed9 100644 --- a/drivers/net/mctp/mctp-serial.c +++ b/drivers/net/mctp/mctp-serial.c @@ -439,9 +439,6 @@ static int mctp_serial_open(struct tty_struct *tty) if (!tty->ops->write) return -EOPNOTSUPP; - if (tty->disc_data) - return -EEXIST; - idx = ida_alloc(&mctp_serial_ida, GFP_KERNEL); if (idx < 0) return idx;