aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Guedes <aguedespe@gmail.com>2012-03-19 23:13:38 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-08 23:41:33 -0400
commit7537e5c3064c5a5751a7b26aba82ad83c5e89190 (patch)
tree901b83d468e5dbc1f0471642d083f4f480cbfcc9
parent3e9fb6d87ee543b10bcf245d4a5c6aa1ab0ac2ab (diff)
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: Andre Guedes <aguedespe@gmail.com> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
-rw-r--r--net/bluetooth/hci_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index e3920b693f04..cc3d164f56fb 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2956,7 +2956,7 @@ int hci_cancel_inquiry(struct hci_dev *hdev)
2956 BT_DBG("%s", hdev->name); 2956 BT_DBG("%s", hdev->name);
2957 2957
2958 if (!test_bit(HCI_INQUIRY, &hdev->flags)) 2958 if (!test_bit(HCI_INQUIRY, &hdev->flags))
2959 return -EPERM; 2959 return -EALREADY;
2960 2960
2961 return hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL); 2961 return hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL);
2962} 2962}