Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7537e5c3 authored by Andre Guedes's avatar Andre Guedes Committed by Gustavo Padovan
Browse files

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: default avatarAndre Guedes <aguedespe@gmail.com>
Signed-off-by: default avatarGustavo Padovan <gustavo@padovan.org>
parent 3e9fb6d8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}