From 9eef66099de2526eec6733115a15887540310b1f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 6 Oct 2009 16:06:57 +0100 Subject: [PATCH] --- yaml --- r: 175324 b: refs/heads/master c: 2a0785ea375fe93cd480599bb40d0c837ff72a2e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/serial/opticon.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e45a27a62120..76dd3ec14bfd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 82fc5943430e3cbf15033ed4186a73f90906345d +refs/heads/master: 2a0785ea375fe93cd480599bb40d0c837ff72a2e diff --git a/trunk/drivers/usb/serial/opticon.c b/trunk/drivers/usb/serial/opticon.c index c03fdc0242dd..4cdb975caa89 100644 --- a/trunk/drivers/usb/serial/opticon.c +++ b/trunk/drivers/usb/serial/opticon.c @@ -502,7 +502,8 @@ static int opticon_resume(struct usb_interface *intf) int result; mutex_lock(&port->port.mutex); - if (port->port.count) + /* This is protected by the port mutex against close/open */ + if (test_bit(ASYNCB_INITIALIZED, &port->port.flags)) result = usb_submit_urb(priv->bulk_read_urb, GFP_NOIO); else result = 0;