diff mbox series

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

Message ID 20210311081805.20424-1-srivasam@codeaurora.org
State Superseded
Headers show
Series ASoC: qcom: lpass-cpu: Fix lpass dai ids parse | expand

Commit Message

Srinivasa Rao Mandadapu March 11, 2021, 8:18 a.m. UTC
The max boundary check while parsing dai ids makes
sound card registration fail after common up dai ids.

Fixes: cd3484f7f1386 (ASoC: dt-bindings: lpass: Fix and common up lpass dai ids)

Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
---
 sound/soc/qcom/lpass-cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown March 11, 2021, 1:22 p.m. UTC | #1
On Thu, Mar 11, 2021 at 01:48:05PM +0530, Srinivasa Rao Mandadapu wrote:
> The max boundary check while parsing dai ids makes
> sound card registration fail after common up dai ids.
> 
> Fixes: cd3484f7f1386 (ASoC: dt-bindings: lpass: Fix and common up lpass dai ids)

Commit: 43e2ca64db47 ("ASoC: qcom: lpass-cpu: Fix lpass dai ids parse")
	Fixes tag: Fixes: cd3484f7f1386 (ASoC: dt-bindings: lpass: Fix and common up lpass dai ids)
	Has these problem(s):
		- Subject does not match target commit subject
		  Just use
			git log -1 --format='Fixes: %h ("%s")'
Srinivasa Rao Mandadapu March 11, 2021, 3:37 p.m. UTC | #2
Thanks for the info Mark!!

Sorry for the typo mistake. Will re-post with proper subject.

On 3/11/2021 6:52 PM, Mark Brown wrote:
> git log -1 --format='Fixes: %h ("%s")'
diff mbox series

Patch

diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index 4762286b33fe..c62d2612e8f5 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -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;
 		}