Re: [PATCH 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for error handling
From: Christophe JAILLET
Date: Tue Jul 14 2026 - 08:33:18 EST
Le 14/07/2026 à 14:00, phucduc.bui@xxxxxxxxx a écrit :
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");
Nitpick: could add some () (i.e. snd_soc_register_card()) to match patch 9/10.
CJ
}
return 0;
}