mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: sn624x: use dev_err_probe() for the regmap failure
@ 2026-11-04 15:01 Aryan Sinha
  2026-11-05  1:45 ` 回复: " qianghua.wang
  0 siblings, 1 reply; 2+ messages in thread
From: Aryan Sinha @ 2026-11-04 15:01 UTC (permalink / raw)
  To: bo liu, qianghua . wang
  Cc: Mark Brown, Liam Girdwood, linux-sound, linux-kernel, Aryan Sinha

dev_err_probe() prints the symbolic errno and stays quiet on
 -EPROBE_DEFER. The sn624x prefix goes too, dev_err_probe() already prints the device name..

Signed-off-by: Aryan Sinha <sinha.aryan03@gmail.com>
---
 sound/soc/codecs/sn624x-sdca-sdw.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/sn624x-sdca-sdw.c b/sound/soc/codecs/sn624x-sdca-sdw.c
index c9e690482..1a83f0a11 100644
--- a/sound/soc/codecs/sn624x-sdca-sdw.c
+++ b/sound/soc/codecs/sn624x-sdca-sdw.c
@@ -1736,11 +1736,9 @@ static int sn624x_sdca_sdw_probe(struct sdw_slave *slave,
 	regmap = devm_regmap_init_sdw_mbq_cfg(&slave->dev, slave,
 					      &sn624x_sdca_regmap,
 					      &sn624x_sdca_mbq_cfg);
-	if (IS_ERR(regmap)) {
-		dev_err(&slave->dev, "sn624x: devm_regmap_init_sdw_mbq_cfg failed (%ld)\n",
-			PTR_ERR(regmap));
-		return PTR_ERR(regmap);
-	}
+	if (IS_ERR(regmap))
+		return dev_err_probe(&slave->dev, PTR_ERR(regmap),
+				     "devm_regmap_init_sdw_mbq_cfg failed\n");
 
 	ret = sn624x_sdca_init(&slave->dev, regmap, slave);
 	if (ret < 0)
-- 
2.46.0


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

end of thread, other threads:[~2026-11-05  1:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 15:01 [PATCH] ASoC: sn624x: use dev_err_probe() for the regmap failure Aryan Sinha
2026-11-05  1:45 ` 回复: " qianghua.wang

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

all inboxes | Powered by JetHome®