Synclink.c cleanup
PATCH 1/1 Synclink.c cleanup
hi,
coverity was lead to two false bug reports ( #782, #783 ) where the driver checked if tty was valid, when it should always be. All cases which I found call these functions by tty->driver->mgsl_write(...) so tty has to be valid. This patch removes those two checks.
Signed-off-by Eric Sesterhenn <[email protected]>
drivers/char/synclink.c renamed from drivers/char/synclink.c.orig +2 -2
@@ -2049,7 +2049,7 @@ static void mgsl_put_char(struct tty_strif (mgsl_paranoia_check (info, tty->name,"mgsl_put_char" ))return ; -if (!tty || !info->xmit_buf) +if (!info->xmit_buf)return ;spin_lock_irqsave (&info->irq_spinlock,flags);
@@ -2139,7 +2139,7 @@ static int mgsl_write(struct tty_structif (mgsl_paranoia_check (info, tty->name,"mgsl_write" )) goto cleanup; -if (!tty || !info->xmit_buf) +if (!info->xmit_buf) goto cleanup; if ( info->params.mode == MGSL_MODE_HDLC ||