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 <peter.ujfalusi@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/core/compress_offload.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 67b3b1a3b526..c91547451311 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -190,6 +190,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;
@@ -200,7 +202,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)
--
2.47.3