summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-05-27 13:45:57 +0100
committerMark Brown <broonie@kernel.org>2016-05-27 13:45:57 +0100
commit0422e5e0be4cce09ed6a095410efa7ee0f978607 (patch)
treedee68086cf8e496fb341d4ad0cf529dcd669eaab /sound
parent77c92d2b4c6a65ef7e9ca0e7d574d4d48fd5efae (diff)
parentcef794f76485f4a4e6affd851ae9f9d0eb4287a5 (diff)
downloadop-kernel-dev-0422e5e0be4cce09ed6a095410efa7ee0f978607.zip
op-kernel-dev-0422e5e0be4cce09ed6a095410efa7ee0f978607.tar.gz
Merge remote-tracking branch 'asoc/topic/qcom' into asoc-next
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/qcom/lpass-platform.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c
index 6e86654..db000c6 100644
--- a/sound/soc/qcom/lpass-platform.c
+++ b/sound/soc/qcom/lpass-platform.c
@@ -474,7 +474,7 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime)
struct lpass_data *drvdata =
snd_soc_platform_get_drvdata(soc_runtime->platform);
struct lpass_variant *v = drvdata->variant;
- int ret;
+ int ret = -EINVAL;
struct lpass_pcm_data *data;
size_t size = lpass_platform_pcm_hardware.buffer_bytes_max;
@@ -491,7 +491,7 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime)
data->rdma_ch = v->alloc_dma_channel(drvdata,
SNDRV_PCM_STREAM_PLAYBACK);
- if (IS_ERR_VALUE(data->rdma_ch))
+ if (data->rdma_ch < 0)
return data->rdma_ch;
drvdata->substream[data->rdma_ch] = psubstream;
@@ -518,8 +518,10 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime)
data->wrdma_ch = v->alloc_dma_channel(drvdata,
SNDRV_PCM_STREAM_CAPTURE);
- if (IS_ERR_VALUE(data->wrdma_ch))
+ if (data->wrdma_ch < 0) {
+ ret = data->wrdma_ch;
goto capture_alloc_err;
+ }
drvdata->substream[data->wrdma_ch] = csubstream;
OpenPOWER on IntegriCloud