[PATCH 2/5] ALSA: ice1712: Make chip_init helpers return void
From: Ingyu Jang
Date: Sun Nov 01 2026 - 12:22:22 EST
snd_ice1712_chip_init() and snd_vt1724_chip_init() always return 0, so
the error checks on their return values in the probe and resume paths
never trigger.
Change both functions to return void and remove the dead checks.
Signed-off-by: Ingyu Jang <ingyujang25@xxxxxxxxxxx>
---
sound/pci/ice1712/ice1712.c | 12 +++---------
sound/pci/ice1712/ice1724.c | 12 +++---------
2 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index 1fad8c418132c..ae1a9de22ce20 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2283,7 +2283,7 @@ static int snd_ice1712_read_eeprom(struct snd_ice1712 *ice,
-static int snd_ice1712_chip_init(struct snd_ice1712 *ice)
+static void snd_ice1712_chip_init(struct snd_ice1712 *ice)
{
outb(ICE1712_RESET | ICE1712_NATIVE, ICEREG(ice, CONTROL));
udelay(200);
@@ -2334,8 +2334,6 @@ static int snd_ice1712_chip_init(struct snd_ice1712 *ice)
ICE1712_IRQ_PBKDS | ICE1712_IRQ_CONCAP | ICE1712_IRQ_CONPBK : 0),
ICEREG(ice, IRQMASK));
outb(0x00, ICEMT(ice, IRQ));
-
- return 0;
}
int snd_ice1712_spdif_build_controls(struct snd_ice1712 *ice)
@@ -2504,8 +2502,7 @@ static int snd_ice1712_create(struct snd_card *card,
if (snd_ice1712_read_eeprom(ice, modelname) < 0)
return -EIO;
- if (snd_ice1712_chip_init(ice) < 0)
- return -EIO;
+ snd_ice1712_chip_init(ice);
return 0;
}
@@ -2683,10 +2680,7 @@ static int snd_ice1712_resume(struct device *dev)
else
rate = PRO_RATE_DEFAULT;
- if (snd_ice1712_chip_init(ice) < 0) {
- snd_card_disconnect(card);
- return -EIO;
- }
+ snd_ice1712_chip_init(ice);
ice->cur_rate = rate;
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index 651d926635675..d4ed7050c533a 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -2342,7 +2342,7 @@ static void snd_vt1724_chip_reset(struct snd_ice1712 *ice)
msleep(10);
}
-static int snd_vt1724_chip_init(struct snd_ice1712 *ice)
+static void snd_vt1724_chip_init(struct snd_ice1712 *ice)
{
outb(ice->eeprom.data[ICE_EEP2_SYSCONF], ICEREG1724(ice, SYS_CFG));
outb(ice->eeprom.data[ICE_EEP2_ACLINK], ICEREG1724(ice, AC97_CFG));
@@ -2364,8 +2364,6 @@ static int snd_vt1724_chip_init(struct snd_ice1712 *ice)
* since they cause machine lockups
*/
outb(VT1724_MULTI_FIFO_ERR, ICEMT1724(ice, DMA_INT_MASK));
-
- return 0;
}
static int snd_vt1724_spdif_build_controls(struct snd_ice1712 *ice)
@@ -2511,8 +2509,7 @@ static int snd_vt1724_create(struct snd_card *card,
snd_vt1724_chip_reset(ice);
if (snd_vt1724_read_eeprom(ice, modelname) < 0)
return -EIO;
- if (snd_vt1724_chip_init(ice) < 0)
- return -EIO;
+ snd_vt1724_chip_init(ice);
return 0;
}
@@ -2703,10 +2700,7 @@ static int snd_vt1724_resume(struct device *dev)
snd_vt1724_chip_reset(ice);
- if (snd_vt1724_chip_init(ice) < 0) {
- snd_card_disconnect(card);
- return -EIO;
- }
+ snd_vt1724_chip_init(ice);
if (ice->pm_resume)
ice->pm_resume(ice);
--
2.34.1