mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
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>
This commit is contained in:
parent
9ddae9dad0
commit
acdae4632e
1 changed files with 1 additions and 1 deletions
|
@ -1369,7 +1369,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream,
|
|||
if (ret < 0) {
|
||||
dev_err(bus->dev, "Compute params failed: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
goto restore_params;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue