Commit 9922f50f authored by Srinivasa Rao Mandadapu's avatar Srinivasa Rao Mandadapu Committed by Mark Brown

ASoC: qcom: lpass-cpu: Fix lpass dai ids parse

The max boundary check while parsing dai ids makes
sound card registration fail after common up dai ids.

Fixes: cd3484f7 ("ASoC: qcom: Fix broken support to MI2S TERTIARY and QUATERNARY")
Signed-off-by: default avatarSrinivasa Rao Mandadapu <srivasam@codeaurora.org>
Link: https://lore.kernel.org/r/20210311154557.24978-1-srivasam@codeaurora.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ea94191e
......@@ -739,7 +739,7 @@ static void of_lpass_cpu_parse_dai_data(struct device *dev,
for_each_child_of_node(dev->of_node, node) {
ret = of_property_read_u32(node, "reg", &id);
if (ret || id < 0 || id >= data->variant->num_dai) {
if (ret || id < 0) {
dev_err(dev, "valid dai id not found: %d\n", ret);
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment