]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ip2: remove unneeded NULL check
authorDan Carpenter <error27@gmail.com>
Thu, 12 Aug 2010 20:48:57 +0000 (13:48 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Aug 2010 01:17:20 +0000 (18:17 -0700)
We don't pass NULL tty pointers to the close function, and anyway we
already dereferenced it at this point.  This check can be removed.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: "Michael H. Warfield" <mhw@wittsend.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/ip2/ip2main.c

index 07f3ea38b5828eda0a16ceed8b23fdbdee891d79..8fa041eb8440aae0670a56be1de1f4fced57e352 100644 (file)
@@ -1650,7 +1650,7 @@ ip2_close( PTTY tty, struct file *pFile )
        /* disable DSS reporting */
        i2QueueCommands(PTYPE_INLINE, pCh, 100, 4,
                                CMD_DCD_NREP, CMD_CTS_NREP, CMD_DSR_NREP, CMD_RI_NREP);
-       if ( !tty || (tty->termios->c_cflag & HUPCL) ) {
+       if (tty->termios->c_cflag & HUPCL) {
                i2QueueCommands(PTYPE_INLINE, pCh, 100, 2, CMD_RTSDN, CMD_DTRDN);
                pCh->dataSetOut &= ~(I2_DTR | I2_RTS);
                i2QueueCommands( PTYPE_INLINE, pCh, 100, 1, CMD_PAUSE(25));