From: Andre Guedes Date: Tue, 20 Mar 2012 03:13:38 +0000 (-0300) Subject: Bluetooth: Replace EPERM by EALREADY in hci_cancel_inquiry X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=7537e5c3064c5a5751a7b26aba82ad83c5e89190;p=linux-edison.git 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 Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index e3920b693f0..cc3d164f56f 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) 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); }