diff options
Diffstat (limited to 'drivers/bluetooth/hci_vhci.c')
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 0f5e04934cec..7ebdb1d30939 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -246,11 +246,9 @@ static int vhci_open(struct inode *inode, struct file *file) | |||
246 | skb_queue_head_init(&data->readq); | 246 | skb_queue_head_init(&data->readq); |
247 | init_waitqueue_head(&data->read_wait); | 247 | init_waitqueue_head(&data->read_wait); |
248 | 248 | ||
249 | lock_kernel(); | ||
250 | hdev = hci_alloc_dev(); | 249 | hdev = hci_alloc_dev(); |
251 | if (!hdev) { | 250 | if (!hdev) { |
252 | kfree(data); | 251 | kfree(data); |
253 | unlock_kernel(); | ||
254 | return -ENOMEM; | 252 | return -ENOMEM; |
255 | } | 253 | } |
256 | 254 | ||
@@ -271,12 +269,10 @@ static int vhci_open(struct inode *inode, struct file *file) | |||
271 | BT_ERR("Can't register HCI device"); | 269 | BT_ERR("Can't register HCI device"); |
272 | kfree(data); | 270 | kfree(data); |
273 | hci_free_dev(hdev); | 271 | hci_free_dev(hdev); |
274 | unlock_kernel(); | ||
275 | return -EBUSY; | 272 | return -EBUSY; |
276 | } | 273 | } |
277 | 274 | ||
278 | file->private_data = data; | 275 | file->private_data = data; |
279 | unlock_kernel(); | ||
280 | 276 | ||
281 | return nonseekable_open(inode, file); | 277 | return nonseekable_open(inode, file); |
282 | } | 278 | } |