From patchwork Tue Dec 12 17:26:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13489721 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E9C5A1 for ; Tue, 12 Dec 2023 09:27:00 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rD6Wx-0001uP-MN; Tue, 12 Dec 2023 18:26:51 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rD6Ww-00FOPM-QL; Tue, 12 Dec 2023 18:26:50 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1rD6Ww-001nbh-H3; Tue, 12 Dec 2023 18:26:50 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Russell King Cc: linux-clk@vger.kernel.org, Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Rob Herring , linux-tegra@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 3/5] memory: tegra210-emc: Simplify usage of clk_rate_exclusive_get() Date: Tue, 12 Dec 2023 18:26:40 +0100 Message-ID: <1b4321a975ac1a903a0c816ef2cce80e7d75eae3.1702400947.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=956; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=ie4CKnPihpbljeuxgdDQACHBuHzPJFsgaUm9SE/yLlM=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBleJfQjouCGPQwbVTQpZHCH3+mc5P4eZ8kxEPs7 4nUI3a0K5aJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZXiX0AAKCRCPgPtYfRL+ TrPSCACJPDSfzHiFme8LNMO5WXJD8MYT1blleR5sU2wv13himlwKpRz181lEcgpDPwv/d7r/nBn ovlNOR/cPdj22iF2Np1psWwvsUfXhnOijVNvyUuyZgsqjUW8TVMBoqg+yxKPfy1Ci+Xd6Em/Xl9 MsSz5I6yQHlYt79kc9K+UoSimvBDW7R8bFM91X+Fzb3PCkCVDDG8jKeAAORmcuILHZdB5+nRmpB AQAfTK3wpi13Fwr54EQ83CvVNencH39m0Y68owZMIH97xru6ER+rWbaNlR/yq6BgTqIY+S8REsv eH/xD+T8INlM+XNf0qnAttCf1OAC4WgQh9IiGZ7cSabVpWXK X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-clk@vger.kernel.org clk_rate_exclusive_get() returns 0 unconditionally. So remove error handling. This prepares making clk_rate_exclusive_get() return void. Signed-off-by: Uwe Kleine-König Acked-by: Krzysztof Kozlowski --- drivers/memory/tegra/tegra210-emc-core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/memory/tegra/tegra210-emc-core.c b/drivers/memory/tegra/tegra210-emc-core.c index 3300bde47c13..957bcaadb24f 100644 --- a/drivers/memory/tegra/tegra210-emc-core.c +++ b/drivers/memory/tegra/tegra210-emc-core.c @@ -2001,11 +2001,7 @@ static int __maybe_unused tegra210_emc_suspend(struct device *dev) struct tegra210_emc *emc = dev_get_drvdata(dev); int err; - err = clk_rate_exclusive_get(emc->clk); - if (err < 0) { - dev_err(emc->dev, "failed to acquire clock: %d\n", err); - return err; - } + clk_rate_exclusive_get(emc->clk); emc->resume_rate = clk_get_rate(emc->clk);