Skip to content

Commit 6d0982a

Browse files
LiaoYuanhong-vivochanwoochoi
authored andcommitted
PM / devfreq: mtk-cci: 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: Chanwoo Choi <cw00.choi@samsung.com> Link: https://patchwork.kernel.org/project/linux-pm/patch/20250903121452.387023-1-liaoyuanhong@vivo.com/
1 parent fc33bf0 commit 6d0982a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/devfreq/mtk-cci-devfreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int mtk_ccifreq_set_voltage(struct mtk_ccifreq_drv *drv, int new_voltage)
8686
soc_data->sram_max_volt);
8787
return ret;
8888
}
89-
} else if (pre_voltage > new_voltage) {
89+
} else {
9090
voltage = max(new_voltage,
9191
pre_vsram - soc_data->max_volt_shift);
9292
ret = regulator_set_voltage(drv->proc_reg, voltage,

0 commit comments

Comments
 (0)