[PATCH v3 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for error handling

From: phucduc . bui

Date: Thu Jul 16 2026 - 06:42:05 EST


From: bui duc phuc <phucduc.bui@xxxxxxxxx>

Use dev_err_probe() to replace dev_err() followed by returning
the error code. This keeps the error handling concise and
suppresses log messages for deferred probe errors.

Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---

Changes in v2:
- Add missing parentheses to `snd_soc_register_card()` (Christophe).

sound/soc/ti/ams-delta.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c
index 61252359d5cb..2759b39c4ebe 100644
--- a/sound/soc/ti/ams-delta.c
+++ b/sound/soc/ti/ams-delta.c
@@ -574,9 +574,9 @@ static int ams_delta_probe(struct platform_device *pdev)

ret = snd_soc_register_card(card);
if (ret) {
- dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
card->dev = NULL;
- return ret;
+ return dev_err_probe(&pdev->dev, ret,
+ "snd_soc_register_card() failed\n");
}
return 0;
}
--
2.43.0