Bluetooth: Ignore hci_unregister_dev return value

Make all bluetooth drivers ignore the return value of hci_unregister_dev as it
always returns 0. In the next step, hci_unregister_dev can be modified to return
void.
Some of the drivers already ignore the return value (including btusb), hence,
this will increase consitency in the bluetooth drivers.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
David Herrmann 2011-10-26 10:43:18 +02:00 committed by Gustavo F. Padovan
parent 96af7391b7
commit 13ea4015d3
6 changed files with 6 additions and 19 deletions

View File

@ -750,9 +750,7 @@ static void bfusb_disconnect(struct usb_interface *intf)
bfusb_close(hdev); bfusb_close(hdev);
if (hci_unregister_dev(hdev) < 0) hci_unregister_dev(hdev);
BT_ERR("Can't unregister HCI device %s", hdev->name);
hci_free_dev(hdev); hci_free_dev(hdev);
} }

View File

@ -844,9 +844,7 @@ static int bluecard_close(bluecard_info_t *info)
/* Turn FPGA off */ /* Turn FPGA off */
outb(0x80, iobase + 0x30); outb(0x80, iobase + 0x30);
if (hci_unregister_dev(hdev) < 0) hci_unregister_dev(hdev);
BT_ERR("Can't unregister HCI device %s", hdev->name);
hci_free_dev(hdev); hci_free_dev(hdev);
return 0; return 0;

View File

@ -636,9 +636,7 @@ static int bt3c_close(bt3c_info_t *info)
bt3c_hci_close(hdev); bt3c_hci_close(hdev);
if (hci_unregister_dev(hdev) < 0) hci_unregister_dev(hdev);
BT_ERR("Can't unregister HCI device %s", hdev->name);
hci_free_dev(hdev); hci_free_dev(hdev);
return 0; return 0;

View File

@ -565,9 +565,7 @@ static int btuart_close(btuart_info_t *info)
spin_unlock_irqrestore(&(info->lock), flags); spin_unlock_irqrestore(&(info->lock), flags);
if (hci_unregister_dev(hdev) < 0) hci_unregister_dev(hdev);
BT_ERR("Can't unregister HCI device %s", hdev->name);
hci_free_dev(hdev); hci_free_dev(hdev);
return 0; return 0;

View File

@ -551,9 +551,7 @@ static int dtl1_close(dtl1_info_t *info)
spin_unlock_irqrestore(&(info->lock), flags); spin_unlock_irqrestore(&(info->lock), flags);
if (hci_unregister_dev(hdev) < 0) hci_unregister_dev(hdev);
BT_ERR("Can't unregister HCI device %s", hdev->name);
hci_free_dev(hdev); hci_free_dev(hdev);
return 0; return 0;

View File

@ -264,10 +264,7 @@ static int vhci_release(struct inode *inode, struct file *file)
struct vhci_data *data = file->private_data; struct vhci_data *data = file->private_data;
struct hci_dev *hdev = data->hdev; struct hci_dev *hdev = data->hdev;
if (hci_unregister_dev(hdev) < 0) { hci_unregister_dev(hdev);
BT_ERR("Can't unregister HCI device %s", hdev->name);
}
hci_free_dev(hdev); hci_free_dev(hdev);
file->private_data = NULL; file->private_data = NULL;