Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2585309lqp; Mon, 25 Mar 2024 03:35:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+ZmwXV54oQC2i1RqaJOrkm3Qq46rKN2GhmE5am5Jmrs4DHNDZcpTY6XlLU1qz6DN/tL5raScaH7I4dx49c82lBTvNwJWWkJG6u/HEAw== X-Google-Smtp-Source: AGHT+IF0Im42asQCa1eW5l0l+45ZkiWn11ahggke1F/evry+yZzT4UHvDMzH8Z6uHzzNKJHWvFhP X-Received: by 2002:a05:6358:891:b0:17f:555c:4819 with SMTP id m17-20020a056358089100b0017f555c4819mr3675862rwj.1.1711362921129; Mon, 25 Mar 2024 03:35:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711362921; cv=pass; d=google.com; s=arc-20160816; b=Jar+7OX4uw/WUZTjj0cYSIdOr96/ecWThrWs9EgeJRMs8GupyHwi/UtpckIW9HNJ8H 8ja+/4cMKjdEgEbblx5im6oRobMVkTvNiky+t55IL0aG6jnJK6qGY6wfxJ9yUyaK2r+c bu09wbotynZYG7A13ruHENHgP6O8BO1HwMBQk6U2R+hR1mf4xQnniE/aBKrojQ/XD7Cx xF038sqoWYdUNOnvuwiN6w5yeGcyQIIcYpVdnDukDJa7ETxNSnrq+USYxkl9ujMPyJS5 /B+QBh56KY4+KWWxekL/63Kazb+Az1+kfzWeGM1UCSaxIkiGVrNiLcP0cYZJarVvuWeL AFzA== 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=u7JXv1EHevBlg7U9Jc6Y+MDGMI214dgLAnpKuJIQA7A=; fh=xj3bqSaF/F1rtoqUMFWnAm5BvdcCzY7hSxsODby3pKo=; b=zluxpVrdSk4eMqt4CM0YdK2tEWhNLH84slmXNNxTNC+QPOmQkYuWM02IzgRzAfph4r vujX7z4jqnQ1mJspmTqqiLD666EGO6bJYsXdbkQ0DyrdrBjr6JbwvEWrddMl/qJzQUUp W7LcMJLSqdRaANO1chXO+63waAqCVdU4nkSaQrp5STnLEVNDT11mGoFC31iTHxS6xnI0 S0EEAQH5x0qPOotTHkIXPgqDWG9/oeMh8J/W6WoqCj6EfRKgEqczu8KsTWSTWVBH3lia s4/H8Ip9pKSouOZwUZQpAHulKcu6MLDaCL508gZE4KzswrVRmj2M99s+WE9/IZonwDtP UGSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GfG6YZgh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115822-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115822-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l2-20020a656802000000b005d9b919b94asi835242pgt.311.2024.03.25.03.35.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:35:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115822-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GfG6YZgh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115822-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115822-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D5AD6B3D76B for ; Mon, 25 Mar 2024 09:29:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4F07378287; Mon, 25 Mar 2024 03:01:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GfG6YZgh" 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 DC783145B2A; Sun, 24 Mar 2024 23:13:52 +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=1711322033; cv=none; b=bZhh5ip5d9wYCTtsRTCrsQpyoEet5doNS+uSyQXOlr9NqVpm+IkF3BV+i7nUHcTfnNclxtRTq8/b7qhhkAkaySczGqH0oamLE4T0z50YJqEzd5XhGcoQmLHgmXmGqHDkqgfRdyohUwxeSdC8uzqZzuu4UQSxetEKL3kZSIUNZ9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322033; c=relaxed/simple; bh=+mmJq1X8ggrGC5bBCdN8KC/xh9zWt9V43RNjKymHVus=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kqe4tHitFDb92JW3ZzxtLcWwPHhBlL+a0OqBKbArxbW/Q8IkbHW2xxaOvd+X1DEBuQLATZkM1TVvzCGwnFCbtzADc4wr/fUd7GjVGP1Z/fb36H1w/qVoqIxsG1nNUcF+Kg6YA76/oZ5CIwA9rbSpP1A9vyI6soZb+ujAYTFJbTY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GfG6YZgh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF15AC43394; Sun, 24 Mar 2024 23:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322032; bh=+mmJq1X8ggrGC5bBCdN8KC/xh9zWt9V43RNjKymHVus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GfG6YZghNUf/7AcwHpNvRuMQMfwcr8tseRNazfXuPbPRUsUKOhfYMOwiFsa+ANS9F dIgydtQ7dbvVnX45qZwIt/5nuIyx50ENKSMV6X+eJ59IHApJoAwshngkehaMsAW7TT bd4D1T2ZoZio/WqPQ3RmaNtLkpPo/3uR6p/lV3tZcGgqna3TIzIobFfh0nre0gECHf 4W/SGbwazDeGYUJhKn9PrR3aOtlH8mm0Kcu/lNVyB0ytGEZS+3CoMe7A0MOTSRDWj7 EPfxrMsD30brIhx+BrT0+8fiWE29hoGuQNvugsmcR8FmYUdg0ybAszkPgsCtXHU9lk PyjyygZtMCg+g== 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.1 104/451] cpufreq: mediatek-hw: Don't error out if supply is not found Date: Sun, 24 Mar 2024 19:06:20 -0400 Message-ID: <20240324231207.1351418-105-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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 42240a7d826da..7f326bb5fd8de 100644 --- a/drivers/cpufreq/mediatek-cpufreq-hw.c +++ b/drivers/cpufreq/mediatek-cpufreq-hw.c @@ -308,7 +308,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