From b683d55d19ab76867e2a24aae135e335edfe36a2 Mon Sep 17 00:00:00 2001
From: Adrian Schneider <adrian.schneider@abusix.com>
Date: Sun, 21 Jul 2019 23:42:29 +0200
Subject: [PATCH] chore(light_sensor) remove unnecessary null check and add
 comment about that

---
 epicardium/modules/light_sensor.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/epicardium/modules/light_sensor.c b/epicardium/modules/light_sensor.c
index 461f60c7..9fcb6f7c 100644
--- a/epicardium/modules/light_sensor.c
+++ b/epicardium/modules/light_sensor.c
@@ -42,9 +42,9 @@ int epic_light_sensor_run()
             readAdcCallback,
             &poll_timer_buffer
         );
-        if (poll_timer == NULL) {
-            //TODO: Handle failure
-        }
+        // since &poll_timer_buffer is not NULL, xTimerCreateStatic should allways succeed, so
+        // we don't need to check for poll_timer being NULL.
+
     }
     if (xTimerIsTimerActive(poll_timer) == pdTRUE)
     {
-- 
GitLab