45c4477ff1ab1fee08095d56eed7840f37b4ad83
[openwrt/staging/blogic.git] /
1 From dd1174c21dacacd6c0129c1dabc5decad35c02c2 Mon Sep 17 00:00:00 2001
2 From: Yang Yingliang <yangyingliang@huawei.com>
3 Date: Tue, 17 May 2022 21:34:50 +0800
4 Subject: [PATCH 16/21] cpufreq: mediatek: fix error return code in
5 mtk_cpu_dvfs_info_init()
6
7 If regulator_get_voltage() fails, it should return the error code in
8 mtk_cpu_dvfs_info_init().
9
10 Fixes: 0daa47325bae ("cpufreq: mediatek: Link CCI device to CPU")
11 Reported-by: Hulk Robot <hulkci@huawei.com>
12 Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
13 Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
14 Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
15 Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
16 ---
17 drivers/cpufreq/mediatek-cpufreq.c | 1 +
18 1 file changed, 1 insertion(+)
19
20 --- a/drivers/cpufreq/mediatek-cpufreq.c
21 +++ b/drivers/cpufreq/mediatek-cpufreq.c
22 @@ -478,6 +478,7 @@ static int mtk_cpu_dvfs_info_init(struct
23 if (info->soc_data->ccifreq_supported) {
24 info->vproc_on_boot = regulator_get_voltage(info->proc_reg);
25 if (info->vproc_on_boot < 0) {
26 + ret = info->vproc_on_boot;
27 dev_err(info->cpu_dev,
28 "invalid Vproc value: %d\n", info->vproc_on_boot);
29 goto out_disable_inter_clock;