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

Commit afa50510 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "bluetooth: wait for write_work to finish before freeing HCI device"

parents 6fb99258 f360e23f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -331,12 +331,11 @@ static void hci_uart_tty_close(struct tty_struct *tty)
	if (hdev)
		hci_uart_close(hdev);

	cancel_work_sync(&hu->write_work);

	if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
		if (hdev) {
			if (test_bit(HCI_UART_REGISTERED, &hu->flags))
				hci_unregister_dev(hdev);
			cancel_work_sync(&hu->write_work);
			hci_free_dev(hdev);
		}
		hu->proto->close(hu);