mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH -next] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init()
  2022-05-17 13:34 [PATCH -next] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() Yang Yingliang
@ 2022-05-17 13:33 ` AngeloGioacchino Del Regno
  2022-05-18  1:36 ` Rex-BC Chen
  2022-06-28  8:09 ` Viresh Kumar
  2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-17 13:33 UTC (permalink / raw)
  To: Yang Yingliang, linux-kernel, linux-mediatek, linux-arm-kernel, linux-pm
  Cc: rex-bc.chen, jia-wei.chang, khilman, viresh.kumar

Il 17/05/22 15:34, Yang Yingliang ha scritto:
> If regulator_get_voltage() fails, it should return the error code in
> mtk_cpu_dvfs_info_init().
> 
> Fixes: 0daa47325bae ("cpufreq: mediatek: Link CCI device to CPU")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Thanks!

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH -next] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init()
@ 2022-05-17 13:34 Yang Yingliang
  2022-05-17 13:33 ` AngeloGioacchino Del Regno
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yang Yingliang @ 2022-05-17 13:34 UTC (permalink / raw)
  To: linux-kernel, linux-mediatek, linux-arm-kernel, linux-pm
  Cc: rex-bc.chen, jia-wei.chang, angelogioacchino.delregno, khilman,
	viresh.kumar

If regulator_get_voltage() fails, it should return the error code in
mtk_cpu_dvfs_info_init().

Fixes: 0daa47325bae ("cpufreq: mediatek: Link CCI device to CPU")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/cpufreq/mediatek-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
index 37a1eb20f5ba..3a2be4552020 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -474,6 +474,7 @@ static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu)
 	if (info->soc_data->ccifreq_supported) {
 		info->vproc_on_boot = regulator_get_voltage(info->proc_reg);
 		if (info->vproc_on_boot < 0) {
+			ret = info->vproc_on_boot;
 			dev_err(info->cpu_dev,
 				"invalid Vproc value: %d\n", info->vproc_on_boot);
 			goto out_disable_inter_clock;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init()
  2022-05-17 13:34 [PATCH -next] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() Yang Yingliang
  2022-05-17 13:33 ` AngeloGioacchino Del Regno
@ 2022-05-18  1:36 ` Rex-BC Chen
  2022-06-28  8:09 ` Viresh Kumar
  2 siblings, 0 replies; 4+ messages in thread
From: Rex-BC Chen @ 2022-05-18  1:36 UTC (permalink / raw)
  To: Yang Yingliang, linux-kernel, linux-mediatek, linux-arm-kernel, linux-pm
  Cc: jia-wei.chang, angelogioacchino.delregno, khilman, viresh.kumar

On Tue, 2022-05-17 at 21:34 +0800, Yang Yingliang wrote:
> If regulator_get_voltage() fails, it should return the error code in
> mtk_cpu_dvfs_info_init().
> 
> Fixes: 0daa47325bae ("cpufreq: mediatek: Link CCI device to CPU")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/cpufreq/mediatek-cpufreq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/mediatek-cpufreq.c
> b/drivers/cpufreq/mediatek-cpufreq.c
> index 37a1eb20f5ba..3a2be4552020 100644
> --- a/drivers/cpufreq/mediatek-cpufreq.c
> +++ b/drivers/cpufreq/mediatek-cpufreq.c
> @@ -474,6 +474,7 @@ static int mtk_cpu_dvfs_info_init(struct
> mtk_cpu_dvfs_info *info, int cpu)
>  	if (info->soc_data->ccifreq_supported) {
>  		info->vproc_on_boot = regulator_get_voltage(info-
> >proc_reg);
>  		if (info->vproc_on_boot < 0) {
> +			ret = info->vproc_on_boot;
>  			dev_err(info->cpu_dev,
>  				"invalid Vproc value: %d\n", info-
> >vproc_on_boot);
>  			goto out_disable_inter_clock;

Thanks for fix this!

Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init()
  2022-05-17 13:34 [PATCH -next] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() Yang Yingliang
  2022-05-17 13:33 ` AngeloGioacchino Del Regno
  2022-05-18  1:36 ` Rex-BC Chen
@ 2022-06-28  8:09 ` Viresh Kumar
  2 siblings, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2022-06-28  8:09 UTC (permalink / raw)
  To: Yang Yingliang
  Cc: linux-kernel, linux-mediatek, linux-arm-kernel, linux-pm,
	rex-bc.chen, jia-wei.chang, angelogioacchino.delregno, khilman

On 17-05-22, 21:34, Yang Yingliang wrote:
> If regulator_get_voltage() fails, it should return the error code in
> mtk_cpu_dvfs_info_init().
> 
> Fixes: 0daa47325bae ("cpufreq: mediatek: Link CCI device to CPU")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/cpufreq/mediatek-cpufreq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
> index 37a1eb20f5ba..3a2be4552020 100644
> --- a/drivers/cpufreq/mediatek-cpufreq.c
> +++ b/drivers/cpufreq/mediatek-cpufreq.c
> @@ -474,6 +474,7 @@ static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu)
>  	if (info->soc_data->ccifreq_supported) {
>  		info->vproc_on_boot = regulator_get_voltage(info->proc_reg);
>  		if (info->vproc_on_boot < 0) {
> +			ret = info->vproc_on_boot;
>  			dev_err(info->cpu_dev,
>  				"invalid Vproc value: %d\n", info->vproc_on_boot);
>  			goto out_disable_inter_clock;

Applied. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-28  8:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 13:34 [PATCH -next] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() Yang Yingliang
2022-05-17 13:33 ` AngeloGioacchino Del Regno
2022-05-18  1:36 ` Rex-BC Chen
2022-06-28  8:09 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®