From nobody Sat Feb 7 07:06:42 2026 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 7374F175571; Sun, 24 Mar 2024 23:36:11 +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=1711323371; cv=none; b=mgqhy7DKu8d20iG9bnwjsHqWvlhmeUOR7eODYoXW10gr1O2TeUQIsDhXZaAcIdpRp4amkFSl3jNRk+khXpjh4PwPBhXrBAp5rdEEvHcK1btZV5j/iqko8mQWR0tAj/SrSseuo0F1trSyJ1g2z+qHZ106Zu3NuamQ96lPU4ChCDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323371; c=relaxed/simple; bh=8adNvIanyHu+32HxJ6+7giaA7jD4PnxuKvBVPt8OA2Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pi2VylxvmRCfp3l7E/VJo91AG2LOefEaZG01semVKeDuq9ZGAIeWd722DA9eHsoNlKROsnrOBGF6FX7sJpRvJq1Ivze91MlQARV9UEzLXR9XMtoTm3LmH5NIqHW6xhuowAL8Z9mlKVETwKGnmHKc5qZG44uJ1fPZ2lueOS6YqdY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V6bHWngr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="V6bHWngr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33733C43390; Sun, 24 Mar 2024 23:36:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323371; bh=8adNvIanyHu+32HxJ6+7giaA7jD4PnxuKvBVPt8OA2Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V6bHWngrn7caz5s5erWj1TDTnw3nYcQH24Zdt6bnRPKLSpzaR/2TB9bhc0MBFisp8 nuWj7n3Ocijt8gVzWu4z+TSObJu4iEyjuOKq7PyXRD+tgvQ9SByXgnUvMWLHeF3A4j 81EP4DCOmUVO+gd+nzRsg4MExxd5OMJSL4qI+PLOAJJaaTVE5Jgjs8xCPk0UMQ38Wz G8N4icNVA44bU8cKGVvszczokv/hGZO6Cv4HoPA2V38bgoI6gZ9GaX5D7AVvx2Wm6K N7ehRHa0rPyS82dHEdVOkEzI4DkYEaAtqhmvgtpAc43poDrqMv/us0ttgDcNKuvZN9 D4i8XB2SdPdRw== 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 5.15 070/317] cpufreq: mediatek-hw: Don't error out if supply is not found Date: Sun, 24 Mar 2024 19:30:50 -0400 Message-ID: <20240324233458.1352854-71-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324233458.1352854-1-sashal@kernel.org> References: <20240324233458.1352854-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: quoted-printable From: N=C3=ADcolas 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 pr= obing") Reported-by: kernelci.org bot Closes: https://linux.kernelci.org/test/case/id/65b0b169710edea22852a3fa/ Signed-off-by: N=C3=ADcolas 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/mediat= ek-cpufreq-hw.c index 4a7478a91fb61..314c1cb6e8f4d 100644 --- a/drivers/cpufreq/mediatek-cpufreq-hw.c +++ b/drivers/cpufreq/mediatek-cpufreq-hw.c @@ -280,7 +280,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); =20 - cpu_reg =3D devm_regulator_get_optional(cpu_dev, "cpu"); + cpu_reg =3D 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); --=20 2.43.0