Commit 3857abc6 authored by Marcel Holtmann's avatar Marcel Holtmann

Bluetooth: Remove BKL from open callback of virtual driver

The BKL push down added some BKL into the open callback of the virtual
driver. The driver is really simple and need no such locking and so just
remove it.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 4db7589f
...@@ -246,11 +246,9 @@ static int vhci_open(struct inode *inode, struct file *file) ...@@ -246,11 +246,9 @@ static int vhci_open(struct inode *inode, struct file *file)
skb_queue_head_init(&data->readq); skb_queue_head_init(&data->readq);
init_waitqueue_head(&data->read_wait); init_waitqueue_head(&data->read_wait);
lock_kernel();
hdev = hci_alloc_dev(); hdev = hci_alloc_dev();
if (!hdev) { if (!hdev) {
kfree(data); kfree(data);
unlock_kernel();
return -ENOMEM; return -ENOMEM;
} }
...@@ -271,12 +269,10 @@ static int vhci_open(struct inode *inode, struct file *file) ...@@ -271,12 +269,10 @@ static int vhci_open(struct inode *inode, struct file *file)
BT_ERR("Can't register HCI device"); BT_ERR("Can't register HCI device");
kfree(data); kfree(data);
hci_free_dev(hdev); hci_free_dev(hdev);
unlock_kernel();
return -EBUSY; return -EBUSY;
} }
file->private_data = data; file->private_data = data;
unlock_kernel();
return nonseekable_open(inode, file); return nonseekable_open(inode, file);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment