Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

TTY: jsm, remove superfluous check

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>

authored by

Jiri Slaby and committed by
Greg Kroah-Hartman
b1622e0a 6be06e72

-6
-6
drivers/tty/serial/jsm/jsm_tty.c
··· 596 596 597 597 jsm_dbg(READ, &ch->ch_bd->pci_dev, "start 2\n"); 598 598 599 - if (data_len <= 0) { 600 - spin_unlock_irqrestore(&ch->ch_lock, lock_flags); 601 - jsm_dbg(READ, &ch->ch_bd->pci_dev, "jsm_input 1\n"); 602 - return; 603 - } 604 - 605 599 len = tty_buffer_request_room(port, data_len); 606 600 n = len; 607 601