File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -339,8 +339,7 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
339
339
ret = snd_sof_probe (sdev );
340
340
if (ret < 0 ) {
341
341
dev_err (sdev -> dev , "failed to probe DSP %d\n" , ret );
342
- sof_ops_free (sdev );
343
- return ret ;
342
+ goto err_sof_probe ;
344
343
}
345
344
346
345
/* check machine info */
@@ -358,15 +357,18 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
358
357
ret = validate_sof_ops (sdev );
359
358
if (ret < 0 ) {
360
359
snd_sof_remove (sdev );
360
+ snd_sof_remove_late (sdev );
361
361
return ret ;
362
362
}
363
363
}
364
364
365
+ return 0 ;
366
+
365
367
err_machine_check :
366
- if ( ret ) {
367
- snd_sof_remove ( sdev );
368
- sof_ops_free (sdev );
369
- }
368
+ snd_sof_remove ( sdev );
369
+ err_sof_probe :
370
+ snd_sof_remove_late (sdev );
371
+ sof_ops_free ( sdev );
370
372
371
373
return ret ;
372
374
}
You can’t perform that action at this time.
0 commit comments