Commit 9b2cef31 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

USB: ssu100: refine process_packet in ssu100

The status information does not appear at the start of each incoming
packet so the check for len < 4 at the start of ssu100_process_packet
is wrong.  Remove it.
Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 17523058
...@@ -575,12 +575,8 @@ static int ssu100_process_packet(struct tty_struct *tty, ...@@ -575,12 +575,8 @@ static int ssu100_process_packet(struct tty_struct *tty,
dbg("%s - port %d", __func__, port->number); dbg("%s - port %d", __func__, port->number);
if (len < 4) { if ((len >= 4) &&
dbg("%s - malformed packet", __func__); (packet[0] == 0x1b) && (packet[1] == 0x1b) &&
return 0;
}
if ((packet[0] == 0x1b) && (packet[1] == 0x1b) &&
((packet[2] == 0x00) || (packet[2] == 0x01))) { ((packet[2] == 0x00) || (packet[2] == 0x01))) {
if (packet[2] == 0x00) if (packet[2] == 0x00)
priv->shadowLSR = packet[3] & (SERIAL_LSR_OE | priv->shadowLSR = packet[3] & (SERIAL_LSR_OE |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment