Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2364564lqp; Sun, 24 Mar 2024 15:59:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVx/5humcrw/luTvrQzpNLrgu1cqD49YlKnIknP8v87VdIZxZIGJMga8+GQXOKopl7IYKshAJJczJObEcByXN6Sh279T22hkkAiVo9sRQ== X-Google-Smtp-Source: AGHT+IG9KBJr293TVdpsl3ZQ7a7WrjLKUHoGCyNV/NrsITHWLI0qI4IuTxN4VeZ98VcUOj4n4L0n X-Received: by 2002:a05:6808:f86:b0:3c3:cd22:8768 with SMTP id o6-20020a0568080f8600b003c3cd228768mr2413180oiw.49.1711321144355; Sun, 24 Mar 2024 15:59:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711321144; cv=pass; d=google.com; s=arc-20160816; b=zKy/vXNBbV0Bu3bIepv82aJLAzUFYLsgJna3LlrPBlum1CCwhFXPBOvctdG29qDm0+ 3vf76WiF/ZoPePQBO/aixjmvXbJ2n7yH8wYSvqow7vStgqx9+ZPWZJfdZkdxVyR1453W NPn41OqaZtpMhZC8JoK5SzS9946YgrJE6gwZGNBsC6+mAzWVQlpE0tYYJVC4A+Dn+YWa tE5w4w8siXlxmeW4I0XWKQoA9OqeSs7/9hOyLxElAN01BqMHXaq2/2PVCdlBiQqw+FEL 2dwe/57/vr+0MMD6JV4UHAqSaPA4dsZ8TjpN8//7n37n3ZW+JOPQPV2UJZIL57b5zMv1 2c+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=O8HuBxG8F7yXqqdFjk2yTBSMygbjdl/FWZ2pEKaCXmY=; fh=xj3bqSaF/F1rtoqUMFWnAm5BvdcCzY7hSxsODby3pKo=; b=FlnA+ZN+UdTQAlmlH+9Z/blxIXzTaASc/rHlRA3iXsbZ1WSGSLLhBSMur9hWYe2/xu 7Ix4NHRfo8T3uE+zXhi98h6B9lDCQDKcRnEBYfXPQfO7kZJXWXuUSIyIDCbBaWvkyS8m FofxWkR5rWO5UmH6wAqLEVN/g3ILuGsJ6u0XQqg/PQxvLoUFzAL0woJxEPCoW13UXH7N 0/P89cO44AOKrtld5D5YUL8gfd5EC+aw9s2ZsM9uN08riRc8SYinJ3f7F+36q4grJQkY yzlRtdLzzggDPprovO9bS1fCKqSfOo/UQL76dbm89s/0VFfVSPPz02aRiMzONMsDSe8L 6GxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xzk5XxjY; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-112988-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o23-20020a656157000000b005dccf9afad5si6680422pgv.305.2024.03.24.15.59.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 15:59:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112988-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xzk5XxjY; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-112988-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0064B2816B5 for ; Sun, 24 Mar 2024 22:59:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06DBC12DD8B; Sun, 24 Mar 2024 22:36:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Xzk5XxjY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03EED12D76F; Sun, 24 Mar 2024 22:36:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319801; cv=none; b=J/vQRhB3HtW1YLyiPKNQvlICt8sU0C5MRLfHjqNh7MLTE/2GwZv+tq1pI/GmEE9N73C7AxjCeFKtTICRW2mlEPFPTrWfHou7G6crXwUkd2z5aZD5fc6PB5g/dkI8lscS/540c2dujKTvt/+omvkVJXKVczKqKub1tWk90ESjK4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319801; c=relaxed/simple; bh=2jaq6Nv6r4YCmGhbPVeZlY0UKTMbM3LoqcudLDvUkVM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=omvlCUE8j2ji7ZuyL08z6Uw8+yxj1dowXOd7XnAG2CP3XHHBwSSs22GrJLMB7OiJz00jtiNQHQHCvHqV6c2ebj5QNRqaow2+lJS6TUktNbx3pKmLG0Bx1gX6upSrlWKA9GewIQZhzauKrN0G7vV08T466+qLPcX8NyAJhrroiCE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=fail (0-bit key) header.d=kernel.org header.i=@kernel.org header.b=Xzk5XxjY reason="key not found in DNS"; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8832C433A6; Sun, 24 Mar 2024 22:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319800; bh=2jaq6Nv6r4YCmGhbPVeZlY0UKTMbM3LoqcudLDvUkVM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xzk5XxjYxEZp/ZcjinApYChrPkvo3LTITPlrpjD5NJt5EAW34Yzqo0fYJsGAj+rFF 9udgBqRawTo6jBN+fuqk1p4AGBuGu67yCh583qRHjgKgkebjeajVkKcZyCkPMaoqnN FIwZ+lPR7sGvLhbLbpm4AZD2KJ5NyAorjVGZ+qlfSantIao9brw3RaDj6XChPeWmlM TNQlbpVQhRVATQmSsG/f3eGIkuuxvpr52Fz81mn/6ojN6tOl0Ja8zzPrX4UocHKxF8 RXobDxCLVBc3AEo/84Imex5jiuxvU9FABytz1KbHhLIJFq/eym+1clyIvfmdhLRysi +OeuoQAvw6ISA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , "kernelci . org bot" , AngeloGioacchino Del Regno , Viresh Kumar , Sasha Levin Subject: [PATCH 6.8 101/715] cpufreq: mediatek-hw: Don't error out if supply is not found Date: Sun, 24 Mar 2024 18:24:40 -0400 Message-ID: <20240324223455.1342824-102-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: NĂ­colas F. R. A. Prado [ Upstream commit eaffb10b51bf74415c9252fd8fb4dd77122501ee ] devm_regulator_get_optional() returns -ENODEV if no supply can be found. By introducing its usage, commit 788715b5f21c ("cpufreq: mediatek-hw: Wait for CPU supplies before probing") caused the driver to fail probe if no supply was present in any of the CPU DT nodes. Use devm_regulator_get() instead since the CPUs do require supplies even if not described in the DT. It will gracefully return a dummy regulator if none is found in the DT node, allowing probe to succeed. Fixes: 788715b5f21c ("cpufreq: mediatek-hw: Wait for CPU supplies before probing") Reported-by: kernelci.org bot Closes: https://linux.kernelci.org/test/case/id/65b0b169710edea22852a3fa/ Signed-off-by: NĂ­colas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/cpufreq/mediatek-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/mediatek-cpufreq-hw.c b/drivers/cpufreq/mediatek-cpufreq-hw.c index a1aa9385980ae..8d097dcddda47 100644 --- a/drivers/cpufreq/mediatek-cpufreq-hw.c +++ b/drivers/cpufreq/mediatek-cpufreq-hw.c @@ -312,7 +312,7 @@ static int mtk_cpufreq_hw_driver_probe(struct platform_device *pdev) return dev_err_probe(&pdev->dev, -EPROBE_DEFER, "Failed to get cpu%d device\n", cpu); - cpu_reg = devm_regulator_get_optional(cpu_dev, "cpu"); + cpu_reg = devm_regulator_get(cpu_dev, "cpu"); if (IS_ERR(cpu_reg)) return dev_err_probe(&pdev->dev, PTR_ERR(cpu_reg), "CPU%d regulator get failed\n", cpu); -- 2.43.0