lkml.org 
[lkml]   [2015]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/12] tty: Remove !tty check from free_tty_struct()
Date
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


\
 
 \ /
  Last update: 2015-11-28 03:41    [W:0.297 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site