public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Sheetal <sheetal@nvidia.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	"Mohan Kumar" <mkumard@nvidia.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	<linux-sound@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Sheetal <sheetal@nvidia.com>
Subject: [PATCH v4 4/4] ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe
Date: Wed, 1 Apr 2026 11:25:00 +0000	[thread overview]
Message-ID: <20260401112500.4076861-5-sheetal@nvidia.com> (raw)
In-Reply-To: <20260401112500.4076861-1-sheetal@nvidia.com>

Use dev_err_probe() for clock errors in the tegra_asoc_machine
probe path.

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra_asoc_machine.c | 21 ++++++++++-----------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c
index d7245a10bba1..e1f2a3b4c5d6 100644
--- a/sound/soc/tegra/tegra_asoc_machine.c
+++ b/sound/soc/tegra/tegra_asoc_machine.c
@@ -591,16 +591,14 @@ int tegra_asoc_machine_probe(struct platform_device *pdev)
 		 * host controller and the external codec
 		 */
 		err = clk_set_rate(machine->clk_pll_a, 73728000);
-		if (err) {
-			dev_err(dev, "Can't set pll_a rate: %d\n", err);
-			return err;
-		}
+		if (err)
+			return dev_err_probe(dev, err,
+					     "can't set pll_a rate\n");
 
 		err = clk_set_rate(machine->clk_pll_a_out0, 24576000);
-		if (err) {
-			dev_err(dev, "Can't set pll_a_out0 rate: %d\n", err);
-			return err;
-		}
+		if (err)
+			return dev_err_probe(dev, err,
+					     "can't set pll_a_out0 rate\n");
 
 		machine->set_baseclock = 73728000;
 		machine->set_mclk = 24576000;
@@ -612,10 +610,9 @@ int tegra_asoc_machine_probe(struct platform_device *pdev)
 	 * only needed for audio.
 	 */
 	err = clk_prepare_enable(machine->clk_cdev1);
-	if (err) {
-		dev_err(dev, "Can't enable cdev1: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't enable cdev1\n");
 
 	err = devm_snd_soc_register_card(dev, card);
 	if (err)
-- 
2.17.1


  parent reply	other threads:[~2026-04-01 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01 11:24 [PATCH v4 0/4] ASoC: tegra: Add error logging for probe and callback failures Sheetal
2026-04-01 11:24 ` [PATCH v4 1/4] ASoC: tegra: Add error logging in tegra210_admaif driver Sheetal
2026-04-01 11:24 ` [PATCH v4 2/4] ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers Sheetal
2026-04-01 11:24 ` [PATCH v4 3/4] ASoC: tegra: Use dev_err_probe() for regmap init failures Sheetal
2026-04-01 11:25 ` Sheetal [this message]
2026-04-01 13:53 ` [PATCH v4 0/4] ASoC: tegra: Add error logging for probe and callback failures Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260401112500.4076861-5-sheetal@nvidia.com \
    --to=sheetal@nvidia.com \
    --cc=broonie@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mkumard@nvidia.com \
    --cc=perex@perex.cz \
    --cc=thierry.reding@kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox