Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e2a8292 authored by Archana Sathyakumar's avatar Archana Sathyakumar Committed by Gerrit - the friendly Code Review server
Browse files

power: qcom: ea: Fix uninitialized temperature and cpu variable



In trigger_cpu_pwr_stats_calc(), if the local variable 'prev_temp' is
already updated with the latest temperature then temp might be used
uninitialized.

When scheduler's power data snapshot updates in the sampling thread,
update the temperature as well if the temperature has been the same for
some duration such that temp is used only when the sensor is read.

In update_userspace_power, incorrect cpumask could cause the function to
use uninitialized cpu variable. Initialize it to -1 at the beginning of
the function and treat unmodified value as error condition.

Change-Id: Ieccdc3f54f9c9f2cecc6b8578400c6fe44333177
Signed-off-by: default avatarArchana Sathyakumar <asathyak@codeaurora.org>
parent 04d53e49
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment