Skip to content

Commit 1301280

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: soc-generic-dmaengine-pcm: Fix error handling
Remove the return value checking, that is to align with the code before adding snd_dmaengine_pcm_refine_runtime_hwparams function. Otherwise it causes a regression on the HiKey board: [ 17.721424] hi6210_i2s f7118000.i2s: ASoC: can't open component f7118000.i2s: -6 Fixes: e957204 ("ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams") Signed-off-by: Shengjiu Wang <[email protected]> Reported-by: John Stultz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent af4bac1 commit 1301280

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

sound/soc/soc-generic-dmaengine-pcm.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ dmaengine_pcm_set_runtime_hwparams(struct snd_soc_component *component,
117117
struct dma_chan *chan = pcm->chan[substream->stream];
118118
struct snd_dmaengine_dai_dma_data *dma_data;
119119
struct snd_pcm_hardware hw;
120-
int ret;
121120

122121
if (pcm->config && pcm->config->pcm_hardware)
123122
return snd_soc_set_runtime_hwparams(substream,
@@ -138,12 +137,15 @@ dmaengine_pcm_set_runtime_hwparams(struct snd_soc_component *component,
138137
if (pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE)
139138
hw.info |= SNDRV_PCM_INFO_BATCH;
140139

141-
ret = snd_dmaengine_pcm_refine_runtime_hwparams(substream,
142-
dma_data,
143-
&hw,
144-
chan);
145-
if (ret)
146-
return ret;
140+
/**
141+
* FIXME: Remove the return value check to align with the code
142+
* before adding snd_dmaengine_pcm_refine_runtime_hwparams
143+
* function.
144+
*/
145+
snd_dmaengine_pcm_refine_runtime_hwparams(substream,
146+
dma_data,
147+
&hw,
148+
chan);
147149

148150
return snd_soc_set_runtime_hwparams(substream, &hw);
149151
}

0 commit comments

Comments
 (0)