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

Commit 82eb703e authored by Johan Hedberg's avatar Johan Hedberg
Browse files

Bluetooth: Fix mgmt_unpair_device command status



The default response status to unpair_device should be set as 0 instead
of a generic failure value. When disconnection is not needed (i.e. we
can reply imediately) we should return success and not failure.

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent bab73cb6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1097,7 +1097,6 @@ static int unpair_device(struct sock *sk, u16 index, void *data, u16 len)
	memset(&rp, 0, sizeof(rp));
	bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr);
	rp.addr.type = cp->addr.type;
	rp.status = MGMT_STATUS_FAILED;

	if (cp->addr.type == MGMT_ADDR_BREDR)
		err = hci_remove_link_key(hdev, &cp->addr.bdaddr);