[Patch] Cleanup char/esp.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

hi,

coverity choked at another two !tty checks, in places where tty can
never be NULL. Since it removes some code we should remove
these checks. (Coverity ids #763,#762)

Signed-off-by Eric Sesterhenn <[email protected]>

--- linux-2.6.17-rc5/drivers/char/esp.c.orig	2006-06-11 23:21:37.000000000 +0200
+++ linux-2.6.17-rc5/drivers/char/esp.c	2006-06-11 23:21:55.000000000 +0200
@@ -1212,7 +1212,7 @@ static void rs_put_char(struct tty_struc
 	if (serial_paranoia_check(info, tty->name, "rs_put_char"))
 		return;
 
-	if (!tty || !info->xmit_buf)
+	if (!info->xmit_buf)
 		return;
 
 	spin_lock_irqsave(&info->lock, flags);
@@ -1256,7 +1256,7 @@ static int rs_write(struct tty_struct * 
 	if (serial_paranoia_check(info, tty->name, "rs_write"))
 		return 0;
 
-	if (!tty || !info->xmit_buf)
+	if (!info->xmit_buf)
 		return 0;
 	    
 	while (1) {


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux