bluetooth: Move the lower half null check to common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-01-18 04:07:37 +08:00
committed by Brennan Ashton
parent 9103184722
commit 7df322c6be
5 changed files with 23 additions and 27 deletions
+5 -1
View File
@@ -75,7 +75,11 @@ int btuart_register(FAR const struct btuart_lowerhalf_s *lower)
wlinfo("lower %p\n", lower);
DEBUGASSERT(lower != NULL);
if (lower == NULL)
{
wlerr("ERROR: btuart lower half is NULL\n");
return -ENODEV;
}
/* Allocate a new instance of the upper half driver state structure */