Skip to content

Commit 58d9588

Browse files
charleskeepaxvinodkoul
authored andcommitted
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: f3016b8 ("soundwire: stream: sdw_stream_add_ functions can be called multiple times") Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230602101140.2040141-1-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 99e09b9 commit 58d9588

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/soundwire/stream.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,8 +2021,10 @@ int sdw_stream_add_slave(struct sdw_slave *slave,
20212021

20222022
skip_alloc_master_rt:
20232023
s_rt = sdw_slave_rt_find(slave, stream);
2024-
if (s_rt)
2024+
if (s_rt) {
2025+
alloc_slave_rt = false;
20252026
goto skip_alloc_slave_rt;
2027+
}
20262028

20272029
s_rt = sdw_slave_rt_alloc(slave, m_rt);
20282030
if (!s_rt) {

0 commit comments

Comments
 (0)