diff options
author | Jiri Slaby <jslaby@suse.cz> | 2010-01-10 01:17:34 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-10 13:27:58 -0800 |
commit | c026ca581f22497c42cbe7a2004fa0d5f1bd6c42 (patch) | |
tree | dccf68d77a11d1157b38fa661d7d75fbb91aaa2c /net/irda/ircomm | |
parent | c3f6c21d6e60e39c81c27f18ebad9c7615eff545 (diff) | |
download | blackbird-obmc-linux-c026ca581f22497c42cbe7a2004fa0d5f1bd6c42.tar.gz blackbird-obmc-linux-c026ca581f22497c42cbe7a2004fa0d5f1bd6c42.zip |
NET: irda, remove unnecessary checks
Stanse found a potential null dereference in ircomm_tty_close
and ircomm_tty_hangup. There is a check for tty being NULL,
but it is dereferenced earlier. But it is bogus, the tty cannot
be NULL, so remove the !tty checks.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/ircomm')
-rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 811984d9324b..8b85d774e47f 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c @@ -496,9 +496,6 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) IRDA_DEBUG(0, "%s()\n", __func__ ); - if (!tty) - return; - IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); @@ -1007,9 +1004,6 @@ static void ircomm_tty_hangup(struct tty_struct *tty) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); - if (!tty) - return; - /* ircomm_tty_flush_buffer(tty); */ ircomm_tty_shutdown(self); |