ChangeSet 1.1041.1.3, 2003/04/07 13:40:55-07:00, greg@kroah.com

USB: set port->tty to NULL after we have closed the port
  
This lets any of the many checks for this contition actually have a
chance of working :)


 drivers/usb/serial/usb-serial.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c	Mon Apr  7 15:11:29 2003
+++ b/drivers/usb/serial/usb-serial.c	Mon Apr  7 15:11:29 2003
@@ -531,7 +531,7 @@
 	dbg("%s - port %d", __FUNCTION__, port->number);
 
 	/* if disconnect beat us to the punch here, there's nothing to do */
-	if (tty->driver_data) {
+	if (tty && tty->driver_data) {
 		__serial_close(port, filp);
 	}
 }
@@ -830,6 +830,7 @@
 			while (port->open_count > 0) {
 				__serial_close(port, NULL);
 			}
+			port->tty = NULL;
 		}
 	}
 
