From c718b87d8c8b7b65a292b54dfb9d3957b4552329 Mon Sep 17 00:00:00 2001 From: Ayushee Date: Tue, 28 May 2019 09:34:36 -0700 Subject: Intelrvp: Adding PECI ifdef in temp_sensor_id enum When PECI is undefined, updating the memory map after initializing the sensors causes an illegal temp_sensor_read and raises an out of bound array index error. Hence, adding PECI ifdef to prevent accessing out of bound index. BUG=b:132061907 BRANCH=None TEST=Able to boot iclrvpy_ite all the way to chrome os Change-Id: I65dd0c3fd8419384e632d24ce137ebde2b9dc5ed Signed-off-by: Ayushee Reviewed-on: https://chromium-review.googlesource.com/1631932 Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: Ayushee Shah Legacy-Commit-Queue: Commit Bot Reviewed-by: Jett Rink Reviewed-by: Vijay P Hiremath --- baseboard/intelrvp/baseboard.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/baseboard/intelrvp/baseboard.h b/baseboard/intelrvp/baseboard.h index c8a083c4ed..5eaf4640de 100644 --- a/baseboard/intelrvp/baseboard.h +++ b/baseboard/intelrvp/baseboard.h @@ -187,7 +187,9 @@ enum temp_sensor_id { TEMP_SNS_AMBIENT, TEMP_SNS_BATTERY, TEMP_SNS_DDR, +#ifdef CONFIG_PECI TEMP_SNS_PECI, +#endif TEMP_SNS_SKIN, TEMP_SNS_VR, TEMP_SENSOR_COUNT, -- cgit v1.2.1