提交 7537e5c3 编写于 作者: A Andre Guedes 提交者: Gustavo Padovan

Bluetooth: Replace EPERM by EALREADY in hci_cancel_inquiry

We should return -EALREADY in hci_cancel_inquiry since it is more
suitable than -EPERM error code.
Signed-off-by: NAndre Guedes <aguedespe@gmail.com>
Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
上级 3e9fb6d8
......@@ -2956,7 +2956,7 @@ int hci_cancel_inquiry(struct hci_dev *hdev)
BT_DBG("%s", hdev->name);
if (!test_bit(HCI_INQUIRY, &hdev->flags))
return -EPERM;
return -EALREADY;
return hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册