diff options
author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2021-04-09 15:09:58 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-04-12 17:05:00 +0100 |
commit | 3bcae98e101727457c727b354c95c3ea8f074dce (patch) | |
tree | ae9e526088f2b3b9acffbcb58c6741198c3e0176 /sound/soc/sof/core.c | |
parent | 26e33ed9f18475ebdc981d45150ac9a019e69f07 (diff) | |
download | lwn-3bcae98e101727457c727b354c95c3ea8f074dce.tar.gz lwn-3bcae98e101727457c727b354c95c3ea8f074dce.zip |
ASoC: SOF: core: Add missing error prints to device probe operation
Two error cases in snd_sof_device_probe() and sof_probe_continue() are
missing error prints.
If either of them happens it is not possible to identify the reason for the
failure.
Add dev_err() prints for the cases to aim debugging.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210409220959.1543456-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/core.c')
-rw-r--r-- | sound/soc/sof/core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index 495295a34c3a..f57e363b5974 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -232,8 +232,11 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) } ret = snd_sof_machine_register(sdev, plat_data); - if (ret < 0) + if (ret < 0) { + dev_err(sdev->dev, + "error: failed to register machine driver %d\n", ret); goto fw_trace_err; + } /* * Some platforms in SOF, ex: BYT, may not have their platform PM @@ -309,8 +312,10 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data) !sof_ops(sdev)->block_read || !sof_ops(sdev)->block_write || !sof_ops(sdev)->send_msg || !sof_ops(sdev)->load_firmware || !sof_ops(sdev)->ipc_msg_data || !sof_ops(sdev)->ipc_pcm_params || - !sof_ops(sdev)->fw_ready) + !sof_ops(sdev)->fw_ready) { + dev_err(dev, "error: missing mandatory ops\n"); return -EINVAL; + } INIT_LIST_HEAD(&sdev->pcm_list); INIT_LIST_HEAD(&sdev->kcontrol_list); |