summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/sof/control.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/sof/control.c b/sound/soc/sof/control.c
index a3fd1d523c09..9582ab5f1113 100644
--- a/sound/soc/sof/control.c
+++ b/sound/soc/sof/control.c
@@ -187,14 +187,18 @@ int snd_sof_bytes_ext_volatile_get(struct snd_kcontrol *kcontrol, unsigned int _
const struct sof_ipc_tplg_ops *tplg_ops = sof_ipc_get_ops(sdev, tplg);
int ret, err;
+ /* ignore the ext_volatile_get call if the callbacks are not provided */
+ if (!tplg_ops || !tplg_ops->control ||
+ !tplg_ops->control->bytes_ext_volatile_get)
+ return 0;
+
ret = pm_runtime_resume_and_get(scomp->dev);
if (ret < 0 && ret != -EACCES) {
dev_err_ratelimited(scomp->dev, "%s: failed to resume %d\n", __func__, ret);
return ret;
}
- if (tplg_ops && tplg_ops->control && tplg_ops->control->bytes_ext_volatile_get)
- ret = tplg_ops->control->bytes_ext_volatile_get(scontrol, binary_data, size);
+ ret = tplg_ops->control->bytes_ext_volatile_get(scontrol, binary_data, size);
err = pm_runtime_put_autosuspend(scomp->dev);
if (err < 0)