Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1279076 > unrolled thread

[PATCH 02/12] tty: Remove !tty check from free_tty_struct()

Started byPeter Hurley <peter@hurleysoftware.com>
First post2015-11-28 03:30 +0100
Last post2015-11-28 03:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 02/12] tty: Remove !tty check from free_tty_struct() Peter Hurley <peter@hurleysoftware.com> - 2015-11-28 03:30 +0100

#1279076 — [PATCH 02/12] tty: Remove !tty check from free_tty_struct()

FromPeter Hurley <peter@hurleysoftware.com>
Date2015-11-28 03:30 +0100
Subject[PATCH 02/12] tty: Remove !tty check from free_tty_struct()
Message-ID<qzDqV-2GJ-9@gated-at.bofh.it>
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 <peter@hurleysoftware.com>
---
 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/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web