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

Commit 4f639ede authored by Fabian Frederick's avatar Fabian Frederick Committed by Marcel Holtmann
Browse files

Bluetooth: fix shadow warning in hci_disconnect()



use clkoff_cp for hci_cp_read_clock_offset instead of cp
(already defined above).

Suggested-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent ed1da148
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -141,10 +141,11 @@ int hci_disconnect(struct hci_conn *conn, __u8 reason)
	 */
	if (conn->type == ACL_LINK && conn->role == HCI_ROLE_MASTER) {
		struct hci_dev *hdev = conn->hdev;
		struct hci_cp_read_clock_offset cp;
		struct hci_cp_read_clock_offset clkoff_cp;

		cp.handle = cpu_to_le16(conn->handle);
		hci_send_cmd(hdev, HCI_OP_READ_CLOCK_OFFSET, sizeof(cp), &cp);
		clkoff_cp.handle = cpu_to_le16(conn->handle);
		hci_send_cmd(hdev, HCI_OP_READ_CLOCK_OFFSET, sizeof(clkoff_cp),
			     &clkoff_cp);
	}

	conn->state = BT_DISCONN;