patch-2.4.12 linux/drivers/usb/serial/empeg.c

Next file: linux/drivers/usb/serial/ftdi_sio.c
Previous file: linux/drivers/usb/serial/digi_acceleport.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.11/linux/drivers/usb/serial/empeg.c linux/drivers/usb/serial/empeg.c
@@ -217,8 +217,10 @@
 	--port->open_count;
 
 	if (port->open_count <= 0) {
-		/* shutdown our bulk read */
-		usb_unlink_urb (port->read_urb);
+		if (serial->dev) {
+			/* shutdown our bulk read */
+			usb_unlink_urb (port->read_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)