[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200430135043.19851-36-sashal@kernel.org>
Date: Thu, 30 Apr 2020 09:50:00 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Olivier Moysan <olivier.moysan@...com>,
Mark Brown <broonie@...nel.org>,
Sasha Levin <sashal@...nel.org>, alsa-devel@...a-project.org,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH AUTOSEL 5.6 36/79] ASoC: stm32: sai: fix sai probe
From: Olivier Moysan <olivier.moysan@...com>
[ Upstream commit e2bcb65782f91390952e849e21b82ed7cb05697f ]
pcm config must be set before snd_dmaengine_pcm_register() call.
Fixes: 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue")
Signed-off-by: Olivier Moysan <olivier.moysan@...com>
Link: https://lore.kernel.org/r/20200417142122.10212-1-olivier.moysan@st.com
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
sound/soc/stm/stm32_sai_sub.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index d3259de43712b..7e965848796c3 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -1543,6 +1543,9 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
return ret;
}
+ if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
+ conf = &stm32_sai_pcm_config_spdif;
+
ret = snd_dmaengine_pcm_register(&pdev->dev, conf, 0);
if (ret) {
dev_err(&pdev->dev, "Could not register pcm dma\n");
@@ -1551,15 +1554,10 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
ret = snd_soc_register_component(&pdev->dev, &stm32_component,
&sai->cpu_dai_drv, 1);
- if (ret) {
+ if (ret)
snd_dmaengine_pcm_unregister(&pdev->dev);
- return ret;
- }
-
- if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
- conf = &stm32_sai_pcm_config_spdif;
- return 0;
+ return ret;
}
static int stm32_sai_sub_remove(struct platform_device *pdev)
--
2.20.1
Powered by blists - more mailing lists