summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2023-04-17 17:05:48 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-18 00:44:34 +0000
commit3a5f279c036ea19ed315d2db34b94f103c30b763 (patch)
tree721c3a8e6ab5b17bcfe6978cb0318e18c43e53ea
parent2ed86ebbcb85842532c9e80e5a82711a1caab1cc (diff)
downloadchrome-ec-3a5f279c036ea19ed315d2db34b94f103c30b763.tar.gz
zephyr: Fix uninitialized variable
The test was causing inconsistent code coverage due to calling set_offset with an uninitialized variable. BRANCH=None BUG=b:278607671 TEST=Ran test several times Change-Id: I779096eb0b90deb040b50b1015bbffcf22fc0583 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4437750 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Aaron Massey <aaronmassey@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com>
-rw-r--r--zephyr/test/drivers/default/src/bmi160.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zephyr/test/drivers/default/src/bmi160.c b/zephyr/test/drivers/default/src/bmi160.c
index 257040b6dd..1cd9105c80 100644
--- a/zephyr/test/drivers/default/src/bmi160.c
+++ b/zephyr/test/drivers/default/src/bmi160.c
@@ -347,7 +347,7 @@ ZTEST_USER(bmi160, test_bmi_gyr_set_offset)
const struct emul *emul = EMUL_DT_GET(BMI_NODE);
struct i2c_common_emul_data *common_data =
emul_bmi_get_i2c_common_data(emul);
- int16_t input_v[3];
+ int16_t input_v[3] = { 0, 0, 0 };
int16_t temp = 0;
intv3_t ret_v;
intv3_t exp_v;