提交 3eec705e 编写于 作者: M Marcel Holtmann 提交者: Johan Hedberg

Bluetooth: Make mgmt_set_powered_failed() return void

The return value of mgmt_set_powered_failed() function is never used
and so make the function just return void.
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 bf6b56db
...@@ -1094,7 +1094,7 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event); ...@@ -1094,7 +1094,7 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event);
int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len);
void mgmt_index_added(struct hci_dev *hdev); void mgmt_index_added(struct hci_dev *hdev);
void 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); void 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);
int mgmt_connectable(struct hci_dev *hdev, u8 connectable); int mgmt_connectable(struct hci_dev *hdev, u8 connectable);
......
...@@ -3934,25 +3934,23 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered) ...@@ -3934,25 +3934,23 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
return err; return err;
} }
int mgmt_set_powered_failed(struct hci_dev *hdev, int err) void mgmt_set_powered_failed(struct hci_dev *hdev, int err)
{ {
struct pending_cmd *cmd; struct pending_cmd *cmd;
u8 status; u8 status;
cmd = mgmt_pending_find(MGMT_OP_SET_POWERED, hdev); cmd = mgmt_pending_find(MGMT_OP_SET_POWERED, hdev);
if (!cmd) if (!cmd)
return -ENOENT; return;
if (err == -ERFKILL) if (err == -ERFKILL)
status = MGMT_STATUS_RFKILLED; status = MGMT_STATUS_RFKILLED;
else else
status = MGMT_STATUS_FAILED; status = MGMT_STATUS_FAILED;
err = cmd_status(cmd->sk, hdev->id, MGMT_OP_SET_POWERED, status); cmd_status(cmd->sk, hdev->id, MGMT_OP_SET_POWERED, status);
mgmt_pending_remove(cmd); mgmt_pending_remove(cmd);
return err;
} }
int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable) int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册