[PATCH] More !tty cleanups in drivers/char
Another bunch of checks in the char drivers .put_char() and .write() routines, where tty can never be NULL. This patch removes these checks to save some code. Coverity choked at those with the following bug ids: isicom.c 767, 766 specialix.c 773, 774 synclink_cs.c 779, 781 synclink_gt.c 784, 785 synclinkmp.c 784, 785 Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Cc: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
fa791f5bdf
commit
326f28e9ec
@@ -1683,7 +1683,7 @@ static int sx_write(struct tty_struct * tty,
|
||||
|
||||
bp = port_Board(port);
|
||||
|
||||
if (!tty || !port->xmit_buf || !tmp_buf) {
|
||||
if (!port->xmit_buf || !tmp_buf) {
|
||||
func_exit();
|
||||
return 0;
|
||||
}
|
||||
@@ -1733,7 +1733,7 @@ static void sx_put_char(struct tty_struct * tty, unsigned char ch)
|
||||
return;
|
||||
}
|
||||
dprintk (SX_DEBUG_TX, "check tty: %p %p\n", tty, port->xmit_buf);
|
||||
if (!tty || !port->xmit_buf) {
|
||||
if (!port->xmit_buf) {
|
||||
func_exit();
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user