Quellcode durchsuchen

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>
Andre Guedes vor 13 Jahren
Ursprung
Commit
7537e5c306
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      net/bluetooth/hci_core.c

+ 1 - 1
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);
 }