patch-2.4.27 linux-2.4.27/drivers/bluetooth/bfusb.c

Next file: linux-2.4.27/drivers/bluetooth/bluecard_cs.c
Previous file: linux-2.4.27/drivers/bluetooth/Makefile.lib
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/drivers/bluetooth/bfusb.c linux-2.4.27/drivers/bluetooth/bfusb.c
@@ -359,11 +359,11 @@
 
 	BT_DBG("bfusb %p urb %p skb %p len %d", bfusb, urb, skb, skb->len);
 
-	if (!test_bit(HCI_RUNNING, &bfusb->hdev.flags))
-		return;
-
 	read_lock(&bfusb->lock);
 
+	if (!test_bit(HCI_RUNNING, &bfusb->hdev.flags))
+		goto unlock;
+
 	if (urb->status || !count)
 		goto resubmit;
 
@@ -414,6 +414,7 @@
 					bfusb->hdev.name, urb, err);
 	}
 
+unlock:
 	read_unlock(&bfusb->lock);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)