diff options
author | Vinod Koul <vkoul@kernel.org> | 2023-06-08 14:38:33 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-06-08 14:38:33 +0300 |
commit | c05bfbd0c62baa052a04a566525611ab932b50a2 (patch) | |
tree | 9b5918514d249761bdd429b217c31d4e07e04994 /drivers/soundwire/qcom.c | |
parent | 94f89950850e1421c46fb44bc94c433cbe5dba00 (diff) | |
parent | 58d95889f3c2064c6139ee94bb0e4d86e1ad4eab (diff) | |
download | linux-c05bfbd0c62baa052a04a566525611ab932b50a2.tar.xz |
Merge branch 'fixes' into next
This resolves dependecy for the series
20230602101140.2040141-1-ckeepax@opensource.cirrus.com
Diffstat (limited to 'drivers/soundwire/qcom.c')
-rw-r--r-- | drivers/soundwire/qcom.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 68d013f376dc..f6adf2c6c1ac 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -1268,8 +1268,10 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream, } sruntime = sdw_alloc_stream(dai->name); - if (!sruntime) - return -ENOMEM; + if (!sruntime) { + ret = -ENOMEM; + goto err_alloc; + } ctrl->sruntime[dai->id] = sruntime; @@ -1279,12 +1281,19 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream, if (ret < 0 && ret != -ENOTSUPP) { dev_err(dai->dev, "Failed to set sdw stream on %s\n", codec_dai->name); - sdw_release_stream(sruntime); - return ret; + goto err_set_stream; } } return 0; + +err_set_stream: + sdw_release_stream(sruntime); +err_alloc: + pm_runtime_mark_last_busy(ctrl->dev); + pm_runtime_put_autosuspend(ctrl->dev); + + return ret; } static void qcom_swrm_shutdown(struct snd_pcm_substream *substream, |