diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2010-08-05 17:01:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-23 23:50:15 -0400 |
commit | 9b2cef31f2823558eb92a35624d37439599f3f9f (patch) | |
tree | a0204b8573ef9695bed6db1373b671d055c5ced9 /drivers/usb/serial/ssu100.c | |
parent | 175230587bcca6dee0a1d6832a8a2138e32ab6ab (diff) |
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: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/ssu100.c')
-rw-r--r-- | drivers/usb/serial/ssu100.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 2826f013752d..c7193880a2b6 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c | |||
@@ -575,12 +575,8 @@ static int ssu100_process_packet(struct tty_struct *tty, | |||
575 | 575 | ||
576 | dbg("%s - port %d", __func__, port->number); | 576 | dbg("%s - port %d", __func__, port->number); |
577 | 577 | ||
578 | if (len < 4) { | 578 | if ((len >= 4) && |
579 | dbg("%s - malformed packet", __func__); | 579 | (packet[0] == 0x1b) && (packet[1] == 0x1b) && |
580 | return 0; | ||
581 | } | ||
582 | |||
583 | if ((packet[0] == 0x1b) && (packet[1] == 0x1b) && | ||
584 | ((packet[2] == 0x00) || (packet[2] == 0x01))) { | 580 | ((packet[2] == 0x00) || (packet[2] == 0x01))) { |
585 | if (packet[2] == 0x00) | 581 | if (packet[2] == 0x00) |
586 | priv->shadowLSR = packet[3] & (SERIAL_LSR_OE | | 582 | priv->shadowLSR = packet[3] & (SERIAL_LSR_OE | |