From: bui duc phuc <[email protected]>

snd_pcm_hw_constraint_integer() is already called by
snd_dmaengine_pcm_open(). Calling it again in msiof_open() is
unnecessary, as the constraint is already applied and the second
call returns 0.

Remove the redundant constraint call.

Acked-by: Kuninori Morimoto <[email protected]>
Signed-off-by: bui duc phuc <[email protected]>
---
 sound/soc/renesas/rcar/msiof.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/sound/soc/renesas/rcar/msiof.c b/sound/soc/renesas/rcar/msiof.c
index 9fead9a22cdc..11a6f22ec0ad 100644
--- a/sound/soc/renesas/rcar/msiof.c
+++ b/sound/soc/renesas/rcar/msiof.c
@@ -419,19 +419,13 @@ static int msiof_open(struct snd_soc_component *component,
                return PTR_ERR(chan);
 
        ret = snd_dmaengine_pcm_open(substream, chan);
-       if (ret < 0)
-               goto open_err_dma;
-
-       snd_soc_set_runtime_hwparams(substream, &msiof_pcm_hardware);
-
-       ret = snd_pcm_hw_constraint_integer(substream->runtime, 
SNDRV_PCM_HW_PARAM_PERIODS);
-
-open_err_dma:
        if (ret < 0) {
                dma_release_channel(chan);
                return ret;
        }
 
+       snd_soc_set_runtime_hwparams(substream, &msiof_pcm_hardware);
+
        return 0;
 }
 
-- 
2.43.0


Reply via email to