* [PATCH] Bluetooth: Replace EPERM by EALREADY in hci_cancel_inquiry
@ 2012-03-20 3:13 Andre Guedes
2012-03-20 13:25 ` Gustavo Padovan
0 siblings, 1 reply; 2+ messages in thread
From: Andre Guedes @ 2012-03-20 3:13 UTC (permalink / raw)
To: linux-bluetooth; +Cc: andre.guedes
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>
---
net/bluetooth/hci_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 68b58af..286f3fc 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2958,7 +2958,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);
}
--
1.7.9.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: Replace EPERM by EALREADY in hci_cancel_inquiry
2012-03-20 3:13 [PATCH] Bluetooth: Replace EPERM by EALREADY in hci_cancel_inquiry Andre Guedes
@ 2012-03-20 13:25 ` Gustavo Padovan
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2012-03-20 13:25 UTC (permalink / raw)
To: Andre Guedes; +Cc: linux-bluetooth, andre.guedes
Hi Andre,
* Andre Guedes <aguedespe@gmail.com> [2012-03-20 00:13:38 -0300]:
> 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>
Applied, thanks.
Gustavo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-20 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-20 3:13 [PATCH] Bluetooth: Replace EPERM by EALREADY in hci_cancel_inquiry Andre Guedes
2012-03-20 13:25 ` Gustavo Padovan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).