TTY: nozomi, remove dead code
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>
This commit is contained in:
parent
cc5ab61086
commit
fa47ba75ec
@ -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);
|
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);
|
spin_lock_irqsave(&dc->spin_mutex, flags);
|
||||||
/* CTS is only valid on the modem channel */
|
/* CTS is only valid on the modem channel */
|
||||||
if (port == &(dc->port[PORT_MDM])) {
|
if (port == &(dc->port[PORT_MDM])) {
|
||||||
@ -1700,7 +1694,6 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
|
|||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&dc->spin_mutex, flags);
|
spin_unlock_irqrestore(&dc->spin_mutex, flags);
|
||||||
|
|
||||||
exit:
|
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user