提交 969dd061 编写于 作者: E Eric Sesterhenn 提交者: Linus Torvalds

[PATCH] Cyclades Cleanup

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: NEric Sesterhenn <snakebyte@gmx.de>
Acked-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 2aa92581
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册