dev: vib: Capture return value of thread_create function
thr variable was not initialized with the return value of thread_create
function,which can lead to an incorrect panic() call
Change-Id: I93d712c2ae67429194f304669ccb9cc26dbf0812
diff --git a/dev/vib/vibrator.c b/dev/vib/vibrator.c
index cc47b24..8c7a031 100644
--- a/dev/vib/vibrator.c
+++ b/dev/vib/vibrator.c
@@ -105,7 +105,7 @@
timer_set_oneshot(&vib_timer, vibrate_time, vib_timer_func, NULL);
#else
vib_time = (vibrate_time/CHECK_VIB_TIMER_FREQUENCY)+1;
- thread_create("vibrator_thread", &vibrator_thread,
+ thr = thread_create("vibrator_thread", &vibrator_thread,
NULL, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE);
if (!thr)
{