diff --git a/src/app_main.c b/src/app_main.c index 874a246..91ad5d4 100644 --- a/src/app_main.c +++ b/src/app_main.c @@ -162,6 +162,9 @@ void UserMain(void) printf("FATAL: unknown board %s\r\n", NINLIGHT_DEVICE_ID); return; } - tls_os_mutex_create(0, &s_lock); + if (tls_os_mutex_create(0, &s_lock) != TLS_OS_SUCCESS) { + printf("FATAL: cannot create app lock\r\n"); + return; + } tls_os_task_create(NULL, "nl_app", app_task, NULL, (u8 *)s_app_stack, sizeof(s_app_stack), NL_APP_PRIO, 0); }