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

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

Merge "bluetooth: Check for NULL pointers in input args"

parents f06bb65a b7ace17a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -386,12 +386,15 @@ static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *f
{
	struct hci_uart *hu = (void *)tty->disc_data;

	if (!hu || tty != hu->tty)
	if (!hu || tty != hu->tty || !data)
		return;

	if (!test_bit(HCI_UART_PROTO_SET, &hu->flags))
		return;

	if (!hu->proto)
		return;

	spin_lock(&hu->rx_lock);
	hu->proto->recv(hu, (void *) data, count);