[PATCH v2] ALSA: ice1712: Make chip_init helpers return void

From: Ingyu Jang

Date: Mon Nov 02 2026 - 04:40:34 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>
---
Changes in v2:
- Rebased onto sound for-next, on top of commit d54819ee513f ("ALSA:
ice1712: add a board-specific EEPROM initialization hook").

Link to v1: https://lore.kernel.org/all/20261101172134.3451066-3-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 5481720a17ed6..2d4c9bdfb62f2 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2299,7 +2299,7 @@ static int snd_ice1712_init_eeprom(struct snd_ice1712 *ice)
return 0;
}

-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);
@@ -2343,8 +2343,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)
@@ -2517,8 +2515,7 @@ static int snd_ice1712_create(struct snd_card *card,
err = snd_ice1712_init_eeprom(ice);
if (err < 0)
return err;
- if (snd_ice1712_chip_init(ice) < 0)
- return -EIO;
+ snd_ice1712_chip_init(ice);

return 0;
}
@@ -2696,10 +2693,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