All of lore.kernel.org
 help / color / mirror / Atom feed
From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Jonathan Hunter <jonathanh@nvidia.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
	Sheetal <sheetal@nvidia.com>,
	u.kleine-koenig@baylibre.com,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Rosen Penev <rosenp@gmail.com>,
	Piyush Patle <piyushpatle228@gmail.com>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org, bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 1/4] ASoC: tegra: tegra20_das: Use dev_err_probe() for error handling
Date: Wed, 15 Jul 2026 12:11:12 +0700	[thread overview]
Message-ID: <20260715051115.17385-2-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260715051115.17385-1-phucduc.bui@gmail.com>

From: bui duc phuc <phucduc.bui@gmail.com>

Replace the existing dev_err() and PTR_ERR() sequence with
dev_err_probe(), preserving the original error code while simplifying
the error handling.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/tegra/tegra20_das.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/tegra/tegra20_das.c b/sound/soc/tegra/tegra20_das.c
index b48cc4a6967b..ea8bc9bcfa67 100644
--- a/sound/soc/tegra/tegra20_das.c
+++ b/sound/soc/tegra/tegra20_das.c
@@ -167,10 +167,9 @@ static int tegra20_das_probe(struct platform_device *pdev)
 
 	das->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
 					    &tegra20_das_regmap_config);
-	if (IS_ERR(das->regmap)) {
-		dev_err(&pdev->dev, "regmap init failed\n");
-		return PTR_ERR(das->regmap);
-	}
+	if (IS_ERR(das->regmap))
+		return dev_err_probe(&pdev->dev, PTR_ERR(das->regmap),
+				     "regmap init failed\n");
 
 	tegra20_das_connect_dap_to_dac(das, TEGRA20_DAS_DAP_ID_1,
 				       TEGRA20_DAS_DAP_SEL_DAC1);
-- 
2.43.0


  reply	other threads:[~2026-07-15  5:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15  5:11 [PATCH 0/4] ASoC: tegra: Simplify error handling phucduc.bui
2026-07-15  5:11 ` phucduc.bui [this message]
2026-07-15  5:11 ` [PATCH 2/4] ASoC: tegra: tegra210_adx: Return the original error directly phucduc.bui
2026-07-15  5:11 ` [PATCH 3/4] ASoC: tegra: tegra210_amx: " phucduc.bui
2026-07-15  5:11 ` [PATCH 4/4] ASoC: tegra: tegra210: Use devm_clk_get_optional() for sync_input clock phucduc.bui

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=20260715051115.17385-2-phucduc.bui@gmail.com \
    --to=phucduc.bui@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=broonie@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzysztof.kozlowski@oss.qualcomm.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=o-takashi@sakamocchi.jp \
    --cc=perex@perex.cz \
    --cc=piyushpatle228@gmail.com \
    --cc=rosenp@gmail.com \
    --cc=sheetal@nvidia.com \
    --cc=thierry.reding@kernel.org \
    --cc=tiwai@suse.com \
    --cc=u.kleine-koenig@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.