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

Commit d91870cc authored by Deepak Kumar's avatar Deepak Kumar
Browse files

msm: kgsl: Add missing braces in opp_notify



Add missing braces to for loop to make sure both
max_level and min_level gets updated properly.

Change-Id: Ic1135c2e740787b8f9066a14467cb670c772d1bd
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent d0edcda0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -910,12 +910,12 @@ static int opp_notify(struct notifier_block *nb,
	min_level = pwr->thermal_pwrlevel_floor;

	/* Thermal limit cannot be lower than lowest non-zero operating freq */
	for (level = 0; level < (pwr->num_pwrlevels - 1); level++)
	for (level = 0; level < (pwr->num_pwrlevels - 1); level++) {
		if (pwr->pwrlevels[level].gpu_freq == max_freq)
			max_level = level;
		if (pwr->pwrlevels[level].gpu_freq == min_freq)
			min_level = level;

	}

	pwr->thermal_pwrlevel = max_level;
	pwr->thermal_pwrlevel_floor = min_level;