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:Robby Cai <robby.cai@nxp.com> Acked-by:
Jason Liu <jason.hui.liu@nxp.com>
Name | Last commit | Last update |
---|