]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soundwire: stream: restore params when prepare ports fail
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 26 Jun 2025 06:09:52 +0000 (14:09 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 21 Jul 2025 05:13:20 +0000 (10:43 +0530)
The bus->params should be restored if the stream is failed to prepare.
The issue exists since beginning. The Fixes tag just indicates the
first commit that the commit can be applied to.

Fixes: 17ed5bef49f4 ("soundwire: add missing newlines in dynamic debug logs")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20250626060952.405996-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/stream.c

index a4bea742b5d9a58c2f0f12efebce174c66a7ff7b..38c9dbd3560652644c1836084b07235108abf4df 100644 (file)
@@ -1510,7 +1510,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream,
                if (ret < 0) {
                        dev_err(bus->dev, "Prepare port(s) failed ret = %d\n",
                                ret);
-                       return ret;
+                       goto restore_params;
                }
        }