diff options
author | Peter Ujfalusi <[email protected]> | 2022-04-05 10:27:02 -0700 |
---|---|---|
committer | Mark Brown <[email protected]> | 2022-04-11 19:17:55 +0100 |
commit | defad9d2e2703b040c3a001978c09c75970357f0 (patch) | |
tree | 8ce33b89590657add76ea902b4793fb97b47e44b | |
parent | 785b3fbe61c6c1c413b696e335e9f288aaec4364 (diff) |
ASoC: SOF: ipc: Add check for mandatory IPC message handling ops
Make sure that the mandatory IPC message handling ops are provided by the
IPC implementation.
Signed-off-by: Peter Ujfalusi <[email protected]>
Reviewed-by: Daniel Baluta <[email protected]>
Reviewed-by: Pierre-Louis Bossart <[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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index 4966a2a41704..d11c5e6e57fb 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -1066,6 +1066,11 @@ struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev) ops = ipc->ops; /* check for mandatory ops */ + if (!ops->tx_msg || !ops->rx_msg || !ops->set_get_data || !ops->get_reply) { + dev_err(sdev->dev, "Missing IPC message handling ops\n"); + return NULL; + } + if (!ops->pcm) { dev_err(sdev->dev, "Missing IPC PCM ops\n"); return NULL; |