public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/5] soundwire: stream: Add missing clear of alloc_slave_rt
@ 2023-06-02 10:11 Charles Keepax
  2023-06-02 10:11 ` [PATCH v2 2/5] soundwire: bandwidth allocation: Remove pointless variable Charles Keepax
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Charles Keepax @ 2023-06-02 10:11 UTC (permalink / raw)
  To: vkoul
  Cc: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale, alsa-devel,
	linux-kernel, patches

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: f3016b891c8c ("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>
---

Changes since v1:
 - Added missing fixes tag

Thanks,
Charles

 drivers/soundwire/stream.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index c2191c07442b0..379228f221869 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -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) {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-08 11:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-02 10:11 [PATCH v2 1/5] soundwire: stream: Add missing clear of alloc_slave_rt Charles Keepax
2023-06-02 10:11 ` [PATCH v2 2/5] soundwire: bandwidth allocation: Remove pointless variable Charles Keepax
2023-06-02 10:11 ` [PATCH v2 3/5] soundwire: stream: Remove unneeded checks for NULL bus Charles Keepax
2023-06-02 14:57   ` Pierre-Louis Bossart
2023-06-02 10:11 ` [PATCH v2 4/5] soundwire: stream: Invert logic on runtime alloc flags Charles Keepax
2023-06-02 15:01   ` Pierre-Louis Bossart
2023-06-02 10:11 ` [PATCH v2 5/5] soundwire: stream: Remove unnecessary gotos Charles Keepax
2023-06-02 15:13   ` Pierre-Louis Bossart
2023-06-08 11:39 ` [PATCH v2 1/5] soundwire: stream: Add missing clear of alloc_slave_rt Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox