public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bus: tegra-aconnect: Use dev_err_probe for probe error paths
@ 2026-03-18  7:11 Sheetal
  2026-04-02  8:16 ` Jon Hunter
  0 siblings, 1 reply; 2+ messages in thread
From: Sheetal @ 2026-03-18  7:11 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, linux-tegra
  Cc: Mohan Kumar, linux-kernel, Sheetal

Convert probe error handling to use dev_err_probe() which provides
proper handling of -EPROBE_DEFER.

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 drivers/bus/tegra-aconnect.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/bus/tegra-aconnect.c b/drivers/bus/tegra-aconnect.c
index 90e3b0a10816..9b2b227332b2 100644
--- a/drivers/bus/tegra-aconnect.c
+++ b/drivers/bus/tegra-aconnect.c
@@ -32,16 +32,14 @@ static int tegra_aconnect_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	aconnect->ape_clk = devm_clk_get(&pdev->dev, "ape");
-	if (IS_ERR(aconnect->ape_clk)) {
-		dev_err(&pdev->dev, "Can't retrieve ape clock\n");
-		return PTR_ERR(aconnect->ape_clk);
-	}
+	if (IS_ERR(aconnect->ape_clk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(aconnect->ape_clk),
+				     "can't retrieve ape clock\n");
 
 	aconnect->apb2ape_clk = devm_clk_get(&pdev->dev, "apb2ape");
-	if (IS_ERR(aconnect->apb2ape_clk)) {
-		dev_err(&pdev->dev, "Can't retrieve apb2ape clock\n");
-		return PTR_ERR(aconnect->apb2ape_clk);
-	}
+	if (IS_ERR(aconnect->apb2ape_clk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(aconnect->apb2ape_clk),
+				     "can't retrieve apb2ape clock\n");
 
 	dev_set_drvdata(&pdev->dev, aconnect);
 	pm_runtime_enable(&pdev->dev);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-02  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18  7:11 [PATCH] bus: tegra-aconnect: Use dev_err_probe for probe error paths Sheetal
2026-04-02  8:16 ` Jon Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox