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: amd: acp: drop bogus NULL check from i2s_irq_handler

When i2s_irq_handler is called, it's guaranteed that adata is not NULL,
since IRQ handlers are guaranteed to be provided with a valid data pointer.
Moreover, adata pointer is being dereferenced right before the NULL check,
which makes the check pointless, even if adata could be NULL.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Murad Masimov <m.masimov@maxima.ru>
Link: https://patch.msgid.link/20241001190848.711-1-m.masimov@maxima.ru
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Murad Masimov and committed by
Mark Brown
8cd4e1f0 436bf279

-3
-3
sound/soc/amd/acp/acp-platform.c
··· 143 143 u16 i2s_flag = 0; 144 144 u32 ext_intr_stat, ext_intr_stat1; 145 145 146 - if (!adata) 147 - return IRQ_NONE; 148 - 149 146 if (adata->rsrc->no_of_ctrls == 2) 150 147 ext_intr_stat1 = readl(ACP_EXTERNAL_INTR_STAT(adata, (rsrc->irqp_used - 1))); 151 148