[PATCH 03/11] ASoC: atmel: Explain component open return value handling

From: phucduc . bui

Date: Fri Oct 16 2026 - 00:11:08 EST


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

Add a comment explaining why .open() must return 0 on success
to ensure proper rollback handling and prevent future changes
from reintroducing the issue.

Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/atmel/atmel-pcm-pdc.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/sound/soc/atmel/atmel-pcm-pdc.c b/sound/soc/atmel/atmel-pcm-pdc.c
index 552bfa30d4ba..4cedf2ad934d 100644
--- a/sound/soc/atmel/atmel-pcm-pdc.c
+++ b/sound/soc/atmel/atmel-pcm-pdc.c
@@ -295,6 +295,11 @@ static int atmel_pcm_open(struct snd_soc_component *component,
}
runtime->private_data = prtd;

+ /*
+ * ASoC only marks the component as opened when .open() returns 0.
+ * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+ * return 0 to ensure .close() is not skipped on rollback.
+ */
return 0;

out:
--
2.43.0