Skip to content

Commit

Permalink
Bluetooth: Remove BKL from open callback of virtual driver
Browse files Browse the repository at this point in the history
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: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Marcel Holtmann committed Jun 8, 2009
1 parent 4db7589 commit 3857abc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/bluetooth/hci_vhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,9 @@ static int vhci_open(struct inode *inode, struct file *file)
skb_queue_head_init(&data->readq);
init_waitqueue_head(&data->read_wait);

lock_kernel();
hdev = hci_alloc_dev();
if (!hdev) {
kfree(data);
unlock_kernel();
return -ENOMEM;
}

Expand All @@ -271,12 +269,10 @@ static int vhci_open(struct inode *inode, struct file *file)
BT_ERR("Can't register HCI device");
kfree(data);
hci_free_dev(hdev);
unlock_kernel();
return -EBUSY;
}

file->private_data = data;
unlock_kernel();

return nonseekable_open(inode, file);
}
Expand Down

0 comments on commit 3857abc

Please sign in to comment.