From: Mark Brown Date: Wed, 1 Apr 2026 16:57:35 +0000 (+0100) Subject: ALSA: compress: Pay attention if drivers error out retrieving pointers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61327f3d817cb5820559ad4f8d0d9abed3d379b1;p=thirdparty%2Flinux.git ALSA: compress: Pay attention if drivers error out retrieving pointers Currently we have a return code on the driver pointer operation but the core ignores that. Let's start paying attention. Reported-by: Péter Ujfalusi Signed-off-by: Mark Brown Acked-by: Vinod Koul Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20260401-alsa-unconfigured-tstamp-v1-2-694c2cb5f71d@kernel.org --- diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index db9f516df8422..fd63d219bf866 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -183,6 +183,8 @@ snd_compr_tstamp32_from_64(struct snd_compr_tstamp *tstamp32, static int snd_compr_update_tstamp(struct snd_compr_stream *stream, struct snd_compr_tstamp64 *tstamp) { + int ret; + if (!stream->ops->pointer) return -ENOTSUPP; @@ -193,7 +195,9 @@ static int snd_compr_update_tstamp(struct snd_compr_stream *stream, break; } - stream->ops->pointer(stream, tstamp); + ret = stream->ops->pointer(stream, tstamp); + if (ret != 0) + return ret; pr_debug("dsp consumed till %u total %llu bytes\n", tstamp->byte_offset, tstamp->copied_total); if (stream->direction == SND_COMPRESS_PLAYBACK)