Skip to content

Commit 7c9190f

Browse files
charleskeepaxbroonie
authored andcommitted
ASoC: compress: Pass error out of soc_compr_pointer
Both soc_compr_pointer and the platform driver pointer callback return ints but current soc_compr_pointer always returns 0. Update this so we return the actual value from the platform driver callback. This doesn't fix any issues simply makes the code more consistent. Signed-off-by: Charles Keepax <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent a4f2d87 commit 7c9190f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sound/soc/soc-compress.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,14 +530,15 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
530530
{
531531
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
532532
struct snd_soc_platform *platform = rtd->platform;
533+
int ret = 0;
533534

534535
mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
535536

536537
if (platform->driver->compr_ops && platform->driver->compr_ops->pointer)
537-
platform->driver->compr_ops->pointer(cstream, tstamp);
538+
ret = platform->driver->compr_ops->pointer(cstream, tstamp);
538539

539540
mutex_unlock(&rtd->pcm_mutex);
540-
return 0;
541+
return ret;
541542
}
542543

543544
static int soc_compr_copy(struct snd_compr_stream *cstream,

0 commit comments

Comments
 (0)