patch-2.4.12 linux/drivers/usb/serial/cyberjack.c
Next file: linux/drivers/usb/serial/digi_acceleport.c
Previous file: linux/drivers/usb/serial/belkin_sa.c
Back to the patch index
Back to the overall index
-  Lines: 17
-  Date:
Wed Oct 10 23:42:47 2001
-  Orig file: 
v2.4.11/linux/drivers/usb/serial/cyberjack.c
-  Orig date: 
Tue Oct  9 17:06:52 2001
diff -u --recursive --new-file v2.4.11/linux/drivers/usb/serial/cyberjack.c linux/drivers/usb/serial/cyberjack.c
@@ -198,10 +198,12 @@
 	--port->open_count;
 
 	if (port->open_count <= 0) {
-		/* shutdown any bulk reads that might be going on */
-		usb_unlink_urb (port->write_urb);
-		usb_unlink_urb (port->read_urb);
-		usb_unlink_urb (port->interrupt_in_urb);
+		if (port->serial->dev) {
+			/* shutdown any bulk reads that might be going on */
+			usb_unlink_urb (port->write_urb);
+			usb_unlink_urb (port->read_urb);
+			usb_unlink_urb (port->interrupt_in_urb);
+		}
 
 		port->active = 0;
 		port->open_count = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)