Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752025AbbK1C0h (ORCPT ); Fri, 27 Nov 2015 21:26:37 -0500 Received: from mail-ig0-f180.google.com ([209.85.213.180]:35616 "EHLO mail-ig0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbbK1C0d (ORCPT ); Fri, 27 Nov 2015 21:26:33 -0500 From: Peter Hurley To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, Peter Hurley Subject: [PATCH 02/12] tty: Remove !tty check from free_tty_struct() Date: Fri, 27 Nov 2015 21:25:47 -0500 Message-Id: <1448677557-16420-3-git-send-email-peter@hurleysoftware.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1448677557-16420-1-git-send-email-peter@hurleysoftware.com> References: <1448677557-16420-1-git-send-email-peter@hurleysoftware.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 29 free_tty_struct() is never called with NULL tty; the two call sites would already have faulted on earlier access. Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 153b7b8..76e4ae0 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -171,8 +171,6 @@ static void release_tty(struct tty_struct *tty, int idx); void free_tty_struct(struct tty_struct *tty) { - if (!tty) - return; tty_ldisc_deinit(tty); put_device(tty->dev); kfree(tty->write_buf); -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/