From: Eric Sesterhenn <snakebyte@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: paulkf@microgate.com
Subject: [PATCH] Synclink.c cleanup
Date: Thu, 08 Jun 2006 00:11:09 +0200 [thread overview]
Message-ID: <1149718269.16898.3.camel@alice> (raw)
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 ||
reply other threads:[~2006-06-07 22:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1149718269.16898.3.camel@alice \
--to=snakebyte@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=paulkf@microgate.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®