]> err.no Git - linux-2.6/commitdiff
[PATCH] Cyclades Cleanup
authorEric Sesterhenn <snakebyte@gmx.de>
Sun, 25 Jun 2006 12:48:45 +0000 (05:48 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:01:17 +0000 (10:01 -0700)
coverity choked at 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)

[akpm@osdl.org: even cleaner!]
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/cyclades.c

index cc7acf877dc0ff92c4b55b1d2314ac4f0461e306..122e7a72a4e178755dedce7922ff91b2f29a2f3e 100644 (file)
@@ -2833,9 +2833,8 @@ cy_write(struct tty_struct * tty, const unsigned char *buf, int count)
         return 0;
     }
         
-    if (!tty || !info->xmit_buf || !tmp_buf){
-        return 0;
-    }
+    if (!info->xmit_buf || !tmp_buf)
+       return 0;
 
     CY_LOCK(info, flags);
     while (1) {
@@ -2884,7 +2883,7 @@ cy_put_char(struct tty_struct *tty, unsigned char ch)
     if (serial_paranoia_check(info, tty->name, "cy_put_char"))
         return;
 
-    if (!tty || !info->xmit_buf)
+    if (!info->xmit_buf)
         return;
 
     CY_LOCK(info, flags);