ASoC: SOF: ipc: Add check for fw_loader ops

Add checks for the mandatory fw_loader ops.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220425221129.124615-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Peter Ujfalusi 2022-04-25 15:11:22 -07:00 committed by Mark Brown
parent d2458baa79
commit 2a6099a73c
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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;