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

Commit 287e3c9c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents d93d4bfd 5e2a8292
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -240,10 +240,10 @@ void trigger_cpu_pwr_stats_calc(void)
		if (cpu_node->sensor_id < 0)
			continue;

		if (cpu_node->temp == prev_temp[cpu])
		if (cpu_node->temp == prev_temp[cpu]) {
			sensor_get_temp(cpu_node->sensor_id, &temp);

			cpu_node->temp = temp / scaling_factor;
		}

		prev_temp[cpu] = cpu_node->temp;

@@ -373,7 +373,7 @@ static int update_userspace_power(struct sched_params __user *argp)
{
	int i;
	int ret;
	int cpu;
	int cpu = -1;
	struct cpu_activity_info *node;
	struct cpu_static_info *sp, *clear_sp;
	int cpumask, cluster, mpidr;
@@ -396,7 +396,7 @@ static int update_userspace_power(struct sched_params __user *argp)
		}
	}

	if (cpu >= num_possible_cpus())
	if ((cpu < 0) || (cpu >= num_possible_cpus()))
		return -EINVAL;

	node = &activity[cpu];