[PATCH 1/2] ALSA: compress: Use EOPNOTSUPP for missing pointer callbacks

From: Cássio Gabriel

Date: Tue Apr 14 2026 - 12:48:27 EST


snd_compr_update_tstamp() returns a sentinel error when a
compress driver does not implement the pointer() callback.

Use -EOPNOTSUPP for that case instead of -ENOTSUPP. This
keeps the behavior the same while switching to the standard
unsupported-operation errno and avoids the checkpatch warning
about ENOTSUPP not being a SUSv4 error code.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>
---
sound/core/compress_offload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index fd63d219bf86..e3239c739d34 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -186,7 +186,7 @@ static int snd_compr_update_tstamp(struct snd_compr_stream *stream,
int ret;

if (!stream->ops->pointer)
- return -ENOTSUPP;
+ return -EOPNOTSUPP;

switch (stream->runtime->state) {
case SNDRV_PCM_STATE_OPEN:

--
2.53.0