diff options
Diffstat (limited to 'drivers/bluetooth/hci_vhci.c')
| -rw-r--r-- | drivers/bluetooth/hci_vhci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 49a80c925123..3256192dcde8 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c @@ -308,12 +308,13 @@ static int hci_vhci_chr_open(struct inode *inode, struct file * file) static int hci_vhci_chr_close(struct inode *inode, struct file *file) { struct hci_vhci_struct *hci_vhci = (struct hci_vhci_struct *) file->private_data; + struct hci_dev *hdev = hci_vhci->hdev; - if (hci_unregister_dev(hci_vhci->hdev) < 0) { - BT_ERR("Can't unregister HCI device %s", hci_vhci->hdev->name); + if (hci_unregister_dev(hdev) < 0) { + BT_ERR("Can't unregister HCI device %s", hdev->name); } - hci_free_dev(hci_vhci->hdev); + hci_free_dev(hdev); file->private_data = NULL; return 0; |
