From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5ABA9C433EF for ; Wed, 18 May 2022 01:36:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233689AbiERBgm (ORCPT ); Tue, 17 May 2022 21:36:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbiERBgi (ORCPT ); Tue, 17 May 2022 21:36:38 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9D8024F1C; Tue, 17 May 2022 18:36:37 -0700 (PDT) X-UUID: 610e22e4ee1c4bcfb8c21545e4798f7a-20220518 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5,REQID:129e1bdf-bfa9-428a-a0e7-af13740df3d0,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:0 X-CID-META: VersionHash:2a19b09,CLOUDID:dab69d79-5ef6-470b-96c9-bdb8ced32786,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,QS:0,BEC:nil X-UUID: 610e22e4ee1c4bcfb8c21545e4798f7a-20220518 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 227094953; Wed, 18 May 2022 09:36:33 +0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Wed, 18 May 2022 09:36:26 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 18 May 2022 09:36:26 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 18 May 2022 09:36:26 +0800 Message-ID: <2b46032a99e6f8994d402ebbf34d9174135993c4.camel@mediatek.com> Subject: Re: [PATCH -next] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() From: Rex-BC Chen To: Yang Yingliang , , , , CC: , , , Date: Wed, 18 May 2022 09:36:26 +0800 In-Reply-To: <20220517133450.2266243-1-yangyingliang@huawei.com> References: <20220517133450.2266243-1-yangyingliang@huawei.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Yang Yingliang > --- > 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