Commit bf6b56db authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Johan Hedberg

Bluetooth: Make mgmt_index_added() and mgmt_index_removed() return void

The return value from mgmt_index_added() and mgmt_index_removed()
functions is never used. So do not pretend that returning an error
would actually be handled and just make both functions return void.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 55594356
...@@ -1092,8 +1092,8 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event); ...@@ -1092,8 +1092,8 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event);
#define DISCOV_BREDR_INQUIRY_LEN 0x08 #define DISCOV_BREDR_INQUIRY_LEN 0x08
int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len);
int mgmt_index_added(struct hci_dev *hdev); void mgmt_index_added(struct hci_dev *hdev);
int mgmt_index_removed(struct hci_dev *hdev); void mgmt_index_removed(struct hci_dev *hdev);
int mgmt_set_powered_failed(struct hci_dev *hdev, int err); int mgmt_set_powered_failed(struct hci_dev *hdev, int err);
int mgmt_powered(struct hci_dev *hdev, u8 powered); int mgmt_powered(struct hci_dev *hdev, u8 powered);
int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable); int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable);
......
...@@ -3782,24 +3782,24 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen) ...@@ -3782,24 +3782,24 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen)
return err; return err;
} }
int mgmt_index_added(struct hci_dev *hdev) void mgmt_index_added(struct hci_dev *hdev)
{ {
if (hdev->dev_type != HCI_BREDR) if (hdev->dev_type != HCI_BREDR)
return -ENOTSUPP; return;
return mgmt_event(MGMT_EV_INDEX_ADDED, hdev, NULL, 0, NULL); mgmt_event(MGMT_EV_INDEX_ADDED, hdev, NULL, 0, NULL);
} }
int mgmt_index_removed(struct hci_dev *hdev) void mgmt_index_removed(struct hci_dev *hdev)
{ {
u8 status = MGMT_STATUS_INVALID_INDEX; u8 status = MGMT_STATUS_INVALID_INDEX;
if (hdev->dev_type != HCI_BREDR) if (hdev->dev_type != HCI_BREDR)
return -ENOTSUPP; return;
mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status); mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status);
return mgmt_event(MGMT_EV_INDEX_REMOVED, hdev, NULL, 0, NULL); mgmt_event(MGMT_EV_INDEX_REMOVED, hdev, NULL, 0, NULL);
} }
static void set_bredr_scan(struct hci_request *req) static void set_bredr_scan(struct hci_request *req)
......
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