]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: da7219: Check for failure reading AAD IRQ events
authorDmytro Maluka <dmy@semihalf.com>
Mon, 17 Jul 2023 19:37:37 +0000 (21:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:22:27 +0000 (12:22 +0200)
commit6bb94f46d31a179c4ac871faa2511e9c6fbc6d93
tree936f2c8ffd59fc023ca16a2364448fd0a68550de
parent279a6dad0cd95820b69ff0789d423e69e4829448
ASoC: da7219: Check for failure reading AAD IRQ events

[ Upstream commit f0691dc16206f21b13c464434366e2cd632b8ed7 ]

When handling an AAD interrupt, if IRQ events read failed (for example,
due to i2c "Transfer while suspended" failure, i.e. when attempting to
read it while DA7219 is suspended, which may happen due to a spurious
AAD interrupt), the events array contains garbage uninitialized values.
So instead of trying to interprete those values and doing any actions
based on them (potentially resulting in misbehavior, e.g. reporting
bogus events), refuse to handle the interrupt.

Signed-off-by: Dmytro Maluka <dmy@semihalf.com>
Link: https://lore.kernel.org/r/20230717193737.161784-3-dmy@semihalf.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/da7219-aad.c