Commit 44f37b6c authored by Ricardo Rivera-Matos's avatar Ricardo Rivera-Matos Committed by Mark Brown

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: default avatarRicardo Rivera-Matos <rriveram@opensource.cirrus.com>
Signed-off-by: default avatarVlad Karpovich <vkarpovi@opensource.cirrus.com>
Acked-by: default avatarRicardo Rivera-Matos <rriveram@opensource.cirrus.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230831162042.471801-1-vkarpovi@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ad191992
......@@ -1023,6 +1023,9 @@ static irqreturn_t cs35l45_spk_safe_err(int irq, void *data)
i = irq - regmap_irq_get_virq(cs35l45->irq_data, 0);
if (i < 0 || i >= ARRAY_SIZE(cs35l45_irqs))
dev_err(cs35l45->dev, "Unspecified global error condition (%d) detected!\n", irq);
else
dev_err(cs35l45->dev, "%s condition detected!\n", cs35l45_irqs[i].name);
return IRQ_HANDLED;
......
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