Skip to contentSkip to conversation

Cleanup char/esp.c

PATCH New Eric Sesterhenn 1 participant 1 message Jun 11, 2006 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Cleanup char/esp.c

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]>

drivers/char/esp.c renamed from drivers/char/esp.c.orig +2 -2
@@ -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) {