File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1099,8 +1099,10 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
1099
1099
}
1100
1100
1101
1101
sruntime = sdw_alloc_stream (dai -> name );
1102
- if (!sruntime )
1103
- return - ENOMEM ;
1102
+ if (!sruntime ) {
1103
+ ret = - ENOMEM ;
1104
+ goto err_alloc ;
1105
+ }
1104
1106
1105
1107
ctrl -> sruntime [dai -> id ] = sruntime ;
1106
1108
@@ -1110,12 +1112,19 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
1110
1112
if (ret < 0 && ret != - ENOTSUPP ) {
1111
1113
dev_err (dai -> dev , "Failed to set sdw stream on %s\n" ,
1112
1114
codec_dai -> name );
1113
- sdw_release_stream (sruntime );
1114
- return ret ;
1115
+ goto err_set_stream ;
1115
1116
}
1116
1117
}
1117
1118
1118
1119
return 0 ;
1120
+
1121
+ err_set_stream :
1122
+ sdw_release_stream (sruntime );
1123
+ err_alloc :
1124
+ pm_runtime_mark_last_busy (ctrl -> dev );
1125
+ pm_runtime_put_autosuspend (ctrl -> dev );
1126
+
1127
+ return ret ;
1119
1128
}
1120
1129
1121
1130
static void qcom_swrm_shutdown (struct snd_pcm_substream * substream ,
You can’t perform that action at this time.
0 commit comments