Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/

authored by

Liao Yuanhong and committed by
Chanwoo Choi
6d0982ae fc33bf0e

+1 -1
+1 -1
drivers/devfreq/mtk-cci-devfreq.c
··· 86 86 soc_data->sram_max_volt); 87 87 return ret; 88 88 } 89 - } else if (pre_voltage > new_voltage) { 89 + } else { 90 90 voltage = max(new_voltage, 91 91 pre_vsram - soc_data->max_volt_shift); 92 92 ret = regulator_set_voltage(drv->proc_reg, voltage,