Skip to content

Commit 3e68189

Browse files
LiaoYuanhong-vivovireshk
authored andcommitted
cpufreq: mediatek: avoid redundant conditions
While 'if (i <= 0) ... else if (i > 0) ...' is technically equivalent to 'if (i <= 0) ... else ...', the latter is vastly easier to read because it avoids writing out a condition that is unnecessary. Let's drop such unnecessary conditions. Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 592532a commit 3e68189

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/cpufreq/mediatek-cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static int mtk_cpufreq_voltage_tracking(struct mtk_cpu_dvfs_info *info,
123123
soc_data->sram_max_volt);
124124
return ret;
125125
}
126-
} else if (pre_vproc > new_vproc) {
126+
} else {
127127
vproc = max(new_vproc,
128128
pre_vsram - soc_data->max_volt_shift);
129129
ret = regulator_set_voltage(proc_reg, vproc,

0 commit comments

Comments
 (0)