]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tty: serial/crisv10.c: remove unnecessary null pointer check
authorCong Ding <dinggnu@gmail.com>
Wed, 16 Jan 2013 22:30:44 +0000 (23:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 01:20:10 +0000 (17:20 -0800)
The pointer tty is dereferened in line 3135, so it is not necessary to check
null again in line 3140.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/crisv10.c

index 45acf103433e691f5feb2bac28c82f4d4c0aa826..5f37c31e32bc848678c89f0147cfc00ee5441461 100644 (file)
@@ -3122,7 +3122,7 @@ static int rs_raw_write(struct tty_struct *tty,
 
        /* first some sanity checks */
 
-       if (!tty || !info->xmit.buf)
+       if (!info->xmit.buf)
                return 0;
 
 #ifdef SERIAL_DEBUG_DATA