]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
TTY: nozomi, remove dead code
authorJiri Slaby <jslaby@suse.cz>
Thu, 3 Jan 2013 14:53:40 +0000 (15:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2013 06:43:16 +0000 (22:43 -0800)
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>
drivers/tty/nozomi.c

index afdd7732d925e33bb929b72d3c22e36e6c64a4df..2dff19796157b8ffc9c7c8bfe4aa3806b362c814 100644 (file)
@@ -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])) {
@@ -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;
 }