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

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

Merge "cpufreq: interactive: Fix potential divide-by-zero operation"

parents b6b71e15 bacbe24f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -480,7 +480,10 @@ static void __cpufreq_interactive_timer(unsigned long data, bool is_notif)
			cputime_speedadj = (u64)sl->prev_load *
					   ppol->policy->cpuinfo.max_freq;
			do_div(cputime_speedadj, tunables->timer_rate);
			new_load_pct = sl->new_task_load * 100 / sl->prev_load;
			new_load_pct = 0;
			if (sl->prev_load)
				new_load_pct = sl->new_task_load * 100 /
						sl->prev_load;
		} else {
			now = update_load(i);
			delta_time = (unsigned int)