Skip to content
Snippets Groups Projects
Commit 9d1a5baf authored by Robby Cai's avatar Robby Cai Committed by Jason Liu
Browse files

LF-4297 Fix Coverity Issue:17320543 Uninitialized scalar variable


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>
parent deadc1cd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment