Skip to content

Commit

Permalink
TTY: jsm, remove superfluous check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Mar 18, 2013
1 parent 6be06e7 commit b1622e0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/tty/serial/jsm/jsm_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b1622e0

Please sign in to comment.