TTY: jsm, remove superfluous check
authorJiri Slaby <jslaby@suse.cz>
Thu, 7 Mar 2013 12:12:25 +0000 (13:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 23:17:20 +0000 (16:17 -0700)
data_len in jsm_input cannot be zero as we would jump out early in the
function. It also cannot be negative because it is an int and we do
bitwise and with 8192. So remove the check.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/jsm/jsm_tty.c

index 00f250ae14c55b49c990dd9c24eabc33353c4973..27bb75070c965867efb6f04a4345322d399c8ca5 100644 (file)
@@ -596,12 +596,6 @@ void jsm_input(struct jsm_channel *ch)
 
        jsm_dbg(READ, &ch->ch_bd->pci_dev, "start 2\n");
 
-       if (data_len <= 0) {
-               spin_unlock_irqrestore(&ch->ch_lock, lock_flags);
-               jsm_dbg(READ, &ch->ch_bd->pci_dev, "jsm_input 1\n");
-               return;
-       }
-
        len = tty_buffer_request_room(port, data_len);
        n = len;