]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:05:04 +0000 (12:05 +0200)
[ Upstream commit dba7d9dbfdc4389361ff3a910e767d3cfca22587 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soundwire/stream.c

index 2624441d2fa92c8d9814e48ec60b8c56fdc9a3c1..3f23d9f0f72655ccb5fec160600cb318f7472118 100644 (file)
@@ -1402,7 +1402,7 @@ program_params:
                if (ret < 0) {
                        dev_err(bus->dev, "Prepare port(s) failed ret = %d\n",
                                ret);
-                       return ret;
+                       goto restore_params;
                }
        }