File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -468,21 +468,34 @@ static int avs_dai_fe_startup(struct snd_pcm_substream *substream, struct snd_so
468
468
469
469
host_stream = snd_hdac_ext_stream_assign (bus , substream , HDAC_EXT_STREAM_TYPE_HOST );
470
470
if (!host_stream ) {
471
- kfree ( data ) ;
472
- return - EBUSY ;
471
+ ret = - EBUSY ;
472
+ goto err ;
473
473
}
474
474
475
475
data -> host_stream = host_stream ;
476
- snd_pcm_hw_constraint_integer (runtime , SNDRV_PCM_HW_PARAM_PERIODS );
476
+ ret = snd_pcm_hw_constraint_integer (runtime , SNDRV_PCM_HW_PARAM_PERIODS );
477
+ if (ret < 0 )
478
+ goto err ;
479
+
477
480
/* avoid wrap-around with wall-clock */
478
- snd_pcm_hw_constraint_minmax (runtime , SNDRV_PCM_HW_PARAM_BUFFER_TIME , 20 , 178000000 );
479
- snd_pcm_hw_constraint_list (runtime , 0 , SNDRV_PCM_HW_PARAM_RATE , & hw_rates );
481
+ ret = snd_pcm_hw_constraint_minmax (runtime , SNDRV_PCM_HW_PARAM_BUFFER_TIME , 20 , 178000000 );
482
+ if (ret < 0 )
483
+ goto err ;
484
+
485
+ ret = snd_pcm_hw_constraint_list (runtime , 0 , SNDRV_PCM_HW_PARAM_RATE , & hw_rates );
486
+ if (ret < 0 )
487
+ goto err ;
488
+
480
489
snd_pcm_set_sync (substream );
481
490
482
491
dev_dbg (dai -> dev , "%s fe STARTUP tag %d str %p" ,
483
492
__func__ , hdac_stream (host_stream )-> stream_tag , substream );
484
493
485
494
return 0 ;
495
+
496
+ err :
497
+ kfree (data );
498
+ return ret ;
486
499
}
487
500
488
501
static void avs_dai_fe_shutdown (struct snd_pcm_substream * substream , struct snd_soc_dai * dai )
You can’t perform that action at this time.
0 commit comments