From nobody Mon Sep 29 21:17:44 2025 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 D4C93C25B08 for ; Tue, 16 Aug 2022 00:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343874AbiHPApl (ORCPT ); Mon, 15 Aug 2022 20:45:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239747AbiHPAnc (ORCPT ); Mon, 15 Aug 2022 20:43:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D856C192320; Mon, 15 Aug 2022 13:40:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7766261185; Mon, 15 Aug 2022 20:40:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B29EC433D6; Mon, 15 Aug 2022 20:40:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596030; bh=L8asPcqcHCORkDYRqvSeB6+WF6pw8XqbpLARQUyZv90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z+SzFYcNnG4F247aanIUcl44nVgU2/kyB+c6KGBf8sWBwN0k6cEOj0QNZgFfUfqX3 kfMiNwVlPtydRQkWb7jxfMxySEGZ5J0doDDmM+4+8aCpvhgV2rxkfY55qXhLnlvYIT SLEHitf5QgHYVcWZNchWiKoO7404MlpWpA9pVF1k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Yang Yingliang , AngeloGioacchino Del Regno , Rex-BC Chen , Viresh Kumar , Sasha Levin Subject: [PATCH 5.19 0952/1157] cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init() Date: Mon, 15 Aug 2022 20:05:08 +0200 Message-Id: <20220815180517.672880886@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yang Yingliang [ Upstream commit 72d67d6b3447303a441a8cedc34f7224b75f64b5 ] 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 Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- 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 76f6b3884e6b..7f2680bc9a0f 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -478,6 +478,7 @@ static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_i= nfo *info, int cpu) if (info->soc_data->ccifreq_supported) { info->vproc_on_boot =3D regulator_get_voltage(info->proc_reg); if (info->vproc_on_boot < 0) { + ret =3D info->vproc_on_boot; dev_err(info->cpu_dev, "invalid Vproc value: %d\n", info->vproc_on_boot); goto out_disable_inter_clock; --=20 2.35.1