Skip to content

Commit

Permalink
ASoC: compress: Pass error out of soc_compr_pointer
Browse files Browse the repository at this point in the history
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 <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Charles Keepax authored and Mark Brown committed Jun 22, 2016
1 parent a4f2d87 commit 7c9190f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/soc/soc-compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,14 +530,15 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
{
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct snd_soc_platform *platform = rtd->platform;
int ret = 0;

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

if (platform->driver->compr_ops && platform->driver->compr_ops->pointer)
platform->driver->compr_ops->pointer(cstream, tstamp);
ret = platform->driver->compr_ops->pointer(cstream, tstamp);

mutex_unlock(&rtd->pcm_mutex);
return 0;
return ret;
}

static int soc_compr_copy(struct snd_compr_stream *cstream,
Expand Down

0 comments on commit 7c9190f

Please sign in to comment.