提交 58d95889 编写于 作者: C Charles Keepax 提交者: Vinod Koul

soundwire: stream: Add missing clear of alloc_slave_rt

The current path that skips allocating the slave runtime does not clear
the alloc_slave_rt flag, this is clearly incorrect. Add the missing
clear, so the runtime won't be erroneously cleaned up.

Fixes: f3016b89 ("soundwire: stream: sdw_stream_add_ functions can be called multiple times")
Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230602101140.2040141-1-ckeepax@opensource.cirrus.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
上级 99e09b9c
...@@ -2021,8 +2021,10 @@ int sdw_stream_add_slave(struct sdw_slave *slave, ...@@ -2021,8 +2021,10 @@ int sdw_stream_add_slave(struct sdw_slave *slave,
skip_alloc_master_rt: skip_alloc_master_rt:
s_rt = sdw_slave_rt_find(slave, stream); s_rt = sdw_slave_rt_find(slave, stream);
if (s_rt) if (s_rt) {
alloc_slave_rt = false;
goto skip_alloc_slave_rt; goto skip_alloc_slave_rt;
}
s_rt = sdw_slave_rt_alloc(slave, m_rt); s_rt = sdw_slave_rt_alloc(slave, m_rt);
if (!s_rt) { if (!s_rt) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册