summaryrefslogtreecommitdiff
path: root/common/online_calibration.c
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-05-06 15:58:13 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-11 22:58:28 +0000
commit4b38a923f7f120b80430fcc045c5e163d061188e (patch)
tree7ffea88e13829e2f7b640fbe7b431ac9517c6bbe /common/online_calibration.c
parent499030dd4e27c290fb8c59eb36110c67bccb0bba (diff)
downloadchrome-ec-4b38a923f7f120b80430fcc045c5e163d061188e.tar.gz
ec: Make tests pass with TEST_ASAN=y
There are some mismatched enums and other errors that prevent building with asan. Fix them all. Change the cq builder to prevent these breakages in the future. If the tests pass with ASAN in the chroot, they will likely pass in gitlab with coverage enabled. BRANCH=None BUG=None TEST=make clobber ; make -j8 runtests && echo PASS make clobber ; make -j8 TEST_ASAN=y runtests && echo PASS Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I6d86fd5750282e0257eb97f65b31046a1613a453 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631365 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/online_calibration.c')
-rw-r--r--common/online_calibration.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/common/online_calibration.c b/common/online_calibration.c
index 3bc56f85c7..6ff46f4714 100644
--- a/common/online_calibration.c
+++ b/common/online_calibration.c
@@ -201,11 +201,9 @@ void online_calibration_init(void)
struct motion_sensor_t *s = motion_sensors + i;
void *type_specific_data = NULL;
- if (s->online_calib_data) {
- s->online_calib_data->last_temperature = -1;
- type_specific_data =
- s->online_calib_data->type_specific_data;
- }
+ s->online_calib_data->last_temperature = -1;
+ type_specific_data =
+ s->online_calib_data->type_specific_data;
if (!type_specific_data)
continue;