[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230225184322.6286-2-fomindmitriyfoma@mail.ru>
Date: Sat, 25 Feb 2023 21:43:22 +0300
From: Dmitry Fomin <fomindmitriyfoma@...l.ru>
To: Jaroslav Kysela <perex@...ex.cz>
Cc: Dmitry Fomin <fomindmitriyfoma@...l.ru>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: [PATCH 2/2] ALSA: ice1712: Delete unreachable code in aureon_add_controls()
If the check (id != 0x41) fails, then id == 0x41 and
the other check in 'else' branch also
fails: id & 0x0F = 0b01000001 & 0b00001111 = 0b00000001.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Dmitry Fomin <fomindmitriyfoma@...l.ru>
---
sound/pci/ice1712/aureon.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
index 9a30f6d35d13..aa24f826d91b 100644
--- a/sound/pci/ice1712/aureon.c
+++ b/sound/pci/ice1712/aureon.c
@@ -1895,10 +1895,6 @@ static int aureon_add_controls(struct snd_ice1712 *ice)
if (id != 0x41)
dev_info(ice->card->dev,
"No CS8415 chip. Skipping CS8415 controls.\n");
- else if ((id & 0x0F) != 0x01)
- dev_info(ice->card->dev,
- "Detected unsupported CS8415 rev. (%c)\n",
- (char)((id & 0x0F) + 'A' - 1));
else {
for (i = 0; i < ARRAY_SIZE(cs8415_controls); i++) {
struct snd_kcontrol *kctl;
--
2.37.2
Powered by blists - more mailing lists