Skip to content

Commit acdae46

Browse files
shumingfanvinodkoul
authored andcommitted
soundwire: stream: restore cumulative bus bandwidth when compute_params callback failed
The _sdw_prepare_stream function just returns the error code when compute_params callback failed. The cumulative bus bandwidth will keep the value and won't be decreased by sdw_deprepare_stream function. We should restore the value of cumulative bus bandwidth when compute_params callback failed. Signed-off-by: Shuming Fan <shumingf@realtek.com> Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230316013041.1008003-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 9ddae9d commit acdae46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soundwire/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream,
13691369
if (ret < 0) {
13701370
dev_err(bus->dev, "Compute params failed: %d\n",
13711371
ret);
1372-
return ret;
1372+
goto restore_params;
13731373
}
13741374
}
13751375

0 commit comments

Comments
 (0)