* [PATCH] Synclink.c cleanup
@ 2006-06-07 22:11 Eric Sesterhenn
0 siblings, 0 replies; only message in thread
From: Eric Sesterhenn @ 2006-06-07 22:11 UTC (permalink / raw)
To: linux-kernel; +Cc: paulkf
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 <snakebyte@gmx.de>
--- linux-2.6.17-rc5/drivers/char/synclink.c.orig 2006-06-08 00:06:04.000000000 +0200
+++ linux-2.6.17-rc5/drivers/char/synclink.c 2006-06-08 00:06:56.000000000 +0200
@@ -2049,7 +2049,7 @@ static void mgsl_put_char(struct tty_str
if (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_struct
if (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 ||
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-07 22:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-07 22:11 [PATCH] Synclink.c cleanup Eric Sesterhenn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®