mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 09:56:46 +00:00
[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: 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>
This commit is contained in:
parent
2aa92581fb
commit
969dd061d8
@ -2833,9 +2833,8 @@ cy_write(struct tty_struct * tty, const unsigned char *buf, int count)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tty || !info->xmit_buf || !tmp_buf){
|
if (!info->xmit_buf || !tmp_buf)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
CY_LOCK(info, flags);
|
CY_LOCK(info, flags);
|
||||||
while (1) {
|
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"))
|
if (serial_paranoia_check(info, tty->name, "cy_put_char"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!tty || !info->xmit_buf)
|
if (!info->xmit_buf)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CY_LOCK(info, flags);
|
CY_LOCK(info, flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user