Skip to content

Commit

Permalink
Bluetooth: Replace EPERM by EALREADY in hci_cancel_inquiry
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andre Guedes authored and Gustavo Padovan committed May 9, 2012
1 parent 3e9fb6d commit 7537e5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 7537e5c

Please sign in to comment.