From patchwork Tue Jan 5 12:02:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 357922 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7195C433E6 for ; Tue, 5 Jan 2021 12:04:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B38B722AB0 for ; Tue, 5 Jan 2021 12:04:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729891AbhAEMDW (ORCPT ); Tue, 5 Jan 2021 07:03:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:38680 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729886AbhAEMDV (ORCPT ); Tue, 5 Jan 2021 07:03:21 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A4815AD7A; Tue, 5 Jan 2021 12:02:40 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 05/12] tty: pty, remove BUG_ON from pty_close Date: Tue, 5 Jan 2021 13:02:32 +0100 Message-Id: <20210105120239.28031-5-jslaby@suse.cz> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210105120239.28031-1-jslaby@suse.cz> References: <20210105120239.28031-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org tty->ops->close is always called with a valid tty, so the BUG_ON cannot trigger. Signed-off-by: Jiri Slaby --- drivers/tty/pty.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index a59f1e062bc6..5e2374580e27 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -45,7 +45,6 @@ static DEFINE_MUTEX(devpts_mutex); static void pty_close(struct tty_struct *tty, struct file *filp) { - BUG_ON(!tty); if (tty->driver->subtype == PTY_TYPE_MASTER) WARN_ON(tty->count > 1); else {