[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241001190848.711-1-m.masimov@maxima.ru>
Date: Tue, 1 Oct 2024 22:08:39 +0300
From: Murad Masimov <m.masimov@...ima.ru>
To: Liam Girdwood <lgirdwood@...il.com>
CC: Murad Masimov <m.masimov@...ima.ru>, Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, Venkata
Prasad Potturu <venkataprasad.potturu@....com>, Muhammad Usama Anjum
<usama.anjum@...labora.com>, Syed Saba Kareem <Syed.SabaKareem@....com>,
Vijendar Mukunda <Vijendar.Mukunda@....com>, <linux-sound@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <lvc-project@...uxtesting.org>
Subject: [PATCH] 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@...ima.ru>
---
sound/soc/amd/acp/acp-platform.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c
index 3a7a467b7063..ce712aea953d 100644
--- a/sound/soc/amd/acp/acp-platform.c
+++ b/sound/soc/amd/acp/acp-platform.c
@@ -142,9 +142,6 @@ static irqreturn_t i2s_irq_handler(int irq, void *data)
u16 i2s_flag = 0;
u32 ext_intr_stat, ext_intr_stat1;
- if (!adata)
- return IRQ_NONE;
-
if (adata->rsrc->no_of_ctrls == 2)
ext_intr_stat1 = readl(ACP_EXTERNAL_INTR_STAT(adata, (rsrc->irqp_used - 1)));
--
2.39.2
Powered by blists - more mailing lists