[PATCH 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for error handling
From: phucduc . bui
Date: Tue Jul 14 2026 - 08:18:40 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>
---
sound/soc/ti/ams-delta.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c
index 61252359d5cb..1c9342ceaf56 100644
--- a/sound/soc/ti/ams-delta.c
+++ b/sound/soc/ti/ams-delta.c
@@ -574,9 +574,8 @@ 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