[PATCH v2 9/9] ASoC: amd: yc: Simplify component registration
From: phucduc . bui
Date: Fri Dec 04 2026 - 06:17:48 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
Return the result of devm_snd_soc_register_component() directly
instead of checking and converting the error to -ENODEV.
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/amd/yc/acp6x-pdm-dma.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/yc/acp6x-pdm-dma.c b/sound/soc/amd/yc/acp6x-pdm-dma.c
index 99977b44bc9e..057ac5b35894 100644
--- a/sound/soc/amd/yc/acp6x-pdm-dma.c
+++ b/sound/soc/amd/yc/acp6x-pdm-dma.c
@@ -390,16 +390,9 @@ static int acp6x_pdm_audio_probe(struct platform_device *pdev)
if (status)
return status;
- status = devm_snd_soc_register_component(&pdev->dev,
- &acp6x_pdm_component,
- &acp6x_pdm_dai_driver, 1);
- if (status) {
- dev_err(&pdev->dev, "Fail to register acp pdm dai\n");
-
- return -ENODEV;
- }
-
- return 0;
+ return devm_snd_soc_register_component(&pdev->dev,
+ &acp6x_pdm_component,
+ &acp6x_pdm_dai_driver, 1);
}
static int acp6x_pdm_resume(struct device *dev)
--
2.43.0