aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ujfalusi <[email protected]>2022-04-25 15:11:22 -0700
committerMark Brown <[email protected]>2022-04-29 13:06:10 +0100
commit2a6099a73c943130c6f864c2df9c5607d25f6b6b (patch)
tree077e01d58dd718984a28b3857d1bcbfba486a878
parentd2458baa799fff377660d86323dd20a3f4deecb4 (diff)
ASoC: SOF: ipc: Add check for fw_loader ops
Add checks for the mandatory fw_loader ops. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sof/ipc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index 48ea58dbc998..8fbd72c40359 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -220,6 +220,12 @@ struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev)
return NULL;
}
+ if (!ops->fw_loader || !ops->fw_loader->validate ||
+ !ops->fw_loader->parse_ext_manifest) {
+ dev_err(sdev->dev, "Missing IPC firmware loading ops\n");
+ return NULL;
+ }
+
if (!ops->pcm) {
dev_err(sdev->dev, "Missing IPC PCM ops\n");
return NULL;