Skip to content
Snippets Groups Projects
user avatar
LF-4297 Fix Coverity Issue:17320543 Uninitialized scalar variable
Robby Cai authored
The variable 'ext_temp' presenting the external temperature is expected to be
used when call with DEFAULT_TEMP_INDEX and overridden by new value if read out
successfully from the PMIC. For some reason sometimes the temperature value from
PMIC is not correct on MX8ULP (e.g., read out as '0'), disable it temporarily.
As a consequence, it causes the variable 'ext_temp' might be uninitialized
and then set a wrong temperature index to register.

This patch fixed this Uninitialized problem by setting to DEFAULT_TEMP.

Current logic is the driver will use DEFAULT_TEMP unless the user assigns
different value. To revisit PMIC temperature driver to restore previous logic.

Signed-off-by: default avatarRobby Cai <robby.cai@nxp.com>
Acked-by: default avatarJason Liu <jason.hui.liu@nxp.com>
9d1a5baf
Name Last commit Last update