Skip to content

Commit

Permalink
soundwire: stream: Add missing clear of alloc_slave_rt
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Charles Keepax <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
charleskeepax authored and vinodkoul committed Jun 8, 2023
1 parent 99e09b9 commit 58d9588
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/soundwire/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -2021,8 +2021,10 @@ int sdw_stream_add_slave(struct sdw_slave *slave,

skip_alloc_master_rt:
s_rt = sdw_slave_rt_find(slave, stream);
if (s_rt)
if (s_rt) {
alloc_slave_rt = false;
goto skip_alloc_slave_rt;
}

s_rt = sdw_slave_rt_alloc(slave, m_rt);
if (!s_rt) {
Expand Down

0 comments on commit 58d9588

Please sign in to comment.