Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3093992rwb; Mon, 15 Aug 2022 17:59:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR6juqno47XxA2DRMkjvrlMZOrHYLEOCLtF54dd9gArMp2UdBsR7MGraSkwgdpdTZknQmgDS X-Received: by 2002:a17:907:69b0:b0:730:a1f0:63e7 with SMTP id ra48-20020a17090769b000b00730a1f063e7mr11651195ejc.364.1660611550020; Mon, 15 Aug 2022 17:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611550; cv=none; d=google.com; s=arc-20160816; b=hTf4SILAb7d7IDkJFDzah0z9Cxr59eMLWr0ilqZP9kI0+eNEPm/r5rGoj8oCpRXbIq nt6ie0sqtJx0+QT8hFJuNCOcJ9WbWJMtViD7GgkcdaP5KIlfBexVixSiqYK8iwLZkl3h y2nBVJ8fZCaEkL8JJKYm3MzMDn+5KgI4f/qD/LwFZgsp5HqRWgNwQmio+3OlzFYg/De6 ITCyaZDHAbonmtGRPcVoVM3qVrmTD5EernNB0N184/cOWDg8b9AUItTaGBqvkNxzIz01 ieJmMvrMURwH7ymPhEGy4dNkpfzosNkB/hQiayCXThE1X3DcEei/UJEeUKvnM9rk4XBW UF9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wZ7x/uzvw/qeJV0tX/QL+wjMPmh3kmjXqclgyVLhBU4=; b=zJtZO/PHN6t8vf61bfAy8ltmMPQ4NAxWmJymwP735tlCMmGArEqbrjmMAMIZZ8jcfb Iy0A4IPqXsTG0jmN54+MrhMqeJ5JSUB6byhgXdB+5D4WUlVrJboQREUJRD/6/+/QBieY r1xoF1I1vZgBQqhpZBnVxQYt1QnUkO/UcPL98RPOvpbep19klRLo0Qbui2jhb4sp+JJQ 4eIHdF6/bdgzhmNjlx03jqj9K5azfln93xNK1pFcmaCZv1utVnWrMlSvyeqk6mxPVc4p 35Q1KPawwnPKDca4CgUXaLFjFQGDwlplAbV9O3QaAcJqlEsvTRqtf6Tyxo0de0Ac1P/L IrWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z+SzFYcN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg21-20020a170907971500b00733002330edsi8801767ejc.342.2022.08.15.17.58.44; Mon, 15 Aug 2022 17:59:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z+SzFYcN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244993AbiHPApk (ORCPT + 99 others); Mon, 15 Aug 2022 20:45:40 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_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.35.1