Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: cs35l45: Checks index of cs35l45_irqs[]

Checks the index computed by the virq offset before printing the
error condition in cs35l45_spk_safe_err() handler.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Signed-off-by: Vlad Karpovich <vkarpovi@opensource.cirrus.com>
Acked-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230831162042.471801-1-vkarpovi@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Ricardo Rivera-Matos and committed by
Mark Brown
44f37b6c ad191992

+4 -1
+4 -1
sound/soc/codecs/cs35l45.c
··· 1023 1023 1024 1024 i = irq - regmap_irq_get_virq(cs35l45->irq_data, 0); 1025 1025 1026 - dev_err(cs35l45->dev, "%s condition detected!\n", cs35l45_irqs[i].name); 1026 + if (i < 0 || i >= ARRAY_SIZE(cs35l45_irqs)) 1027 + dev_err(cs35l45->dev, "Unspecified global error condition (%d) detected!\n", irq); 1028 + else 1029 + dev_err(cs35l45->dev, "%s condition detected!\n", cs35l45_irqs[i].name); 1027 1030 1028 1031 return IRQ_HANDLED; 1029 1032 }