summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/core.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-04-19 08:57:14 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2024-04-19 09:02:22 -0400
commita96cb3bf390eebfead5fc7a2092f8452a7997d1b (patch)
treed0e16dc3e903ce705f85c4c334d750b4b304a0f0 /sound/soc/sof/core.c
parent1ab157ce573f5abd932b72679a7c67b1ed0bff13 (diff)
parentb377c66ae3509ccea596512d6afb4777711c4870 (diff)
downloadlinux-a96cb3bf390eebfead5fc7a2092f8452a7997d1b.tar.gz
linux-a96cb3bf390eebfead5fc7a2092f8452a7997d1b.tar.bz2
linux-a96cb3bf390eebfead5fc7a2092f8452a7997d1b.zip
Merge x86 bugfixes from Linux 6.9-rc3
Pull fix for SEV-SNP late disable bugs. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'sound/soc/sof/core.c')
-rw-r--r--sound/soc/sof/core.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index 9b00ede2a486..cc84d4c81be9 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -339,8 +339,7 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
ret = snd_sof_probe(sdev);
if (ret < 0) {
dev_err(sdev->dev, "failed to probe DSP %d\n", ret);
- sof_ops_free(sdev);
- return ret;
+ goto err_sof_probe;
}
/* check machine info */
@@ -358,15 +357,18 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
ret = validate_sof_ops(sdev);
if (ret < 0) {
snd_sof_remove(sdev);
+ snd_sof_remove_late(sdev);
return ret;
}
}
+ return 0;
+
err_machine_check:
- if (ret) {
- snd_sof_remove(sdev);
- sof_ops_free(sdev);
- }
+ snd_sof_remove(sdev);
+err_sof_probe:
+ snd_sof_remove_late(sdev);
+ sof_ops_free(sdev);
return ret;
}