Skip to content

Commit

Permalink
TTY: nozomi, remove dead code
Browse files Browse the repository at this point in the history
We test for !dc twice, remove the second test. Coverity found this.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Jan 16, 2013
1 parent cc5ab61 commit fa47ba7
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/tty/nozomi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,12 +1679,6 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,

rval = kfifo_in(&port->fifo_ul, (unsigned char *)buffer, count);

/* notify card */
if (unlikely(dc == NULL)) {
DBG1("No device context?");
goto exit;
}

spin_lock_irqsave(&dc->spin_mutex, flags);
/* CTS is only valid on the modem channel */
if (port == &(dc->port[PORT_MDM])) {
Expand All @@ -1700,7 +1694,6 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
}
spin_unlock_irqrestore(&dc->spin_mutex, flags);

exit:
return rval;
}

Expand Down

0 comments on commit fa47ba7

Please sign in to comment.