If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom. Fortunately all we need to do is process the URB
without trying to ram its contents down the throat of an ex-tty.

Signed-off-by: Alan Cox <[EMAIL PROTECTED]>

diff -u --new-file --recursive --exclude-from /usr/src/exclude 
linux.vanilla-2.6.24-rc6-mm1/drivers/usb/serial/keyspan.c 
linux-2.6.24-rc6-mm1/drivers/usb/serial/keyspan.c
--- linux.vanilla-2.6.24-rc6-mm1/drivers/usb/serial/keyspan.c   2008-01-02 
16:04:06.000000000 +0000
+++ linux-2.6.24-rc6-mm1/drivers/usb/serial/keyspan.c   2008-01-02 
16:18:00.000000000 +0000
@@ -447,7 +447,7 @@
 
        port = (struct usb_serial_port *) urb->context;
        tty = port->tty;
-       if (urb->actual_length) {
+       if (tty && urb->actual_length) {
                /* 0x80 bit is error flag */
                if ((data[0] & 0x80) == 0) {
                        /* no errors on individual bytes, only possible overrun 
err*/
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to