diff options
| author | Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> | 2026-08-18 14:16:54 +0530 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-08-18 19:22:46 +0100 |
| commit | 0a9e00d5ebdfcf460902f463e765f737d3fe935e (patch) | |
| tree | bcba5e30f3d8ba7183dbc1c3c6f95dde45f83c02 | |
| parent | 9c9fb79f9769ba9042086817ee57aa4eef8b8a97 (diff) | |
| download | linux-0a9e00d5ebdfcf460902f463e765f737d3fe935e.tar.gz linux-0a9e00d5ebdfcf460902f463e765f737d3fe935e.zip | |
ASoC: qcom: common: Distinguish missing and invalid TDM slot configuration
qcom_snd_parse_dai_tdm_slots() uses -EINVAL for both missing DAI-link
TDM configuration and malformed TDM slot properties. As a result,
qcom_snd_apply_dai_tdm_slots() silently ignores configuration errors.
Return -ENOENT for missing DAI-link configuration and preserve -EINVAL
for malformed TDM slot properties.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://sashiko.dev/#/patchset/20260804070307.117119-1-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260818084655.3240284-4-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/qcom/common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index d231024206db..d9f256d51973 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -103,14 +103,14 @@ static int qcom_snd_parse_dai_tdm_slots(struct snd_soc_pcm_runtime *rtd, int ret; if (!link_np) - return -EINVAL; + return -ENOENT; struct device_node *cpu_np __free(device_node) = of_get_child_by_name(link_np, "cpu"); struct device_node *codec_np __free(device_node) = of_get_child_by_name(link_np, "codec"); if (!cpu_np || !codec_np) - return -EINVAL; + return -ENOENT; ret = qcom_snd_parse_tdm_slot(cpu_np, cpu_cfg); if (ret) @@ -172,7 +172,7 @@ int qcom_snd_apply_dai_tdm_slots(struct snd_soc_pcm_runtime *rtd) ret = qcom_snd_get_dai_tdm_slots(rtd, &cpu_cfg, &codec_cfg); if (ret) - return ret == -EINVAL ? 0 : ret; + return ret == -ENOENT ? 0 : ret; return qcom_snd_apply_dai_tdm_slots_cfg(rtd, &cpu_cfg, &codec_cfg); } |
