drivers: serial: Add error for insuff buffer

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2022-06-23 14:33:30 +08:00 committed by Xiang Xiao
parent 442e75575e
commit 77557d8d9f
1 changed files with 4 additions and 0 deletions

View File

@ -174,6 +174,10 @@ static int uart_bth4_receive(FAR struct bt_driver_s *drv,
uart_bth4_pollnotify(dev, POLLIN);
}
}
else
{
ret = -ENOMEM;
}
leave_critical_section(flags);
return ret;