Unverified Commit 37a2ee54 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!2608 [sync] PR-2557: Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO

parents 304ddec1 84b4bd22
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -768,7 +768,8 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
		break;

	case HCIUARTGETPROTO:
		if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
		if (test_bit(HCI_UART_PROTO_SET, &hu->flags) &&
		    test_bit(HCI_UART_PROTO_READY, &hu->flags))
			err = hu->proto->id;
		else
			err = -EUNATCH;