Skip to content

Commit

Permalink
[PATCH] Cyclades Cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sesterhenn authored and Linus Torvalds committed Jun 25, 2006
1 parent 2aa9258 commit 969dd06
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/char/cyclades.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 969dd06

Please sign in to comment.