lkml.org 
[lkml]   [2009]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] Char: mxser, remove unnecessary tty test
Date
Stanse found unnecessary test in mxser_startup.

tty is dereferenced earlier, the test is superfluous. Remove it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/char/mxser.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 5e28d39..859ffb3 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -905,8 +905,7 @@ static int mxser_startup(struct tty_struct *tty)
if (inb(info->ioaddr + UART_LSR) == 0xff) {
spin_unlock_irqrestore(&info->slock, flags);
if (capable(CAP_SYS_ADMIN)) {
- if (tty)
- set_bit(TTY_IO_ERROR, &tty->flags);
+ set_bit(TTY_IO_ERROR, &tty->flags);
return 0;
} else
return -ENODEV;
--
1.6.4.2


\
 
 \ /
  Last update: 2009-09-23 16:15    [W:0.031 / U:6.580 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site