[PATCH 4/5] ALSA: vx222: Make put_xilinx_data() return void

From: Ingyu Jang

Date: Sun Nov 01 2026 - 12:23:49 EST


put_xilinx_data() always returns 0, so the error check on its return
value in vx2_load_xilinx_binary() never triggers.

Change the function's return type to void and remove the dead check.

Signed-off-by: Ingyu Jang <ingyujang25@xxxxxxxxxxx>
---
sound/pci/vx222/vx222_ops.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
index 40f3716c478f4..348666b422f5c 100644
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -321,7 +321,8 @@ static void vx2_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
/*
* transfer counts bits to PLX
*/
-static int put_xilinx_data(struct vx_core *chip, unsigned int port, unsigned int counts, unsigned char data)
+static void put_xilinx_data(struct vx_core *chip, unsigned int port,
+ unsigned int counts, unsigned char data)
{
unsigned int i;

@@ -347,7 +348,6 @@ static int put_xilinx_data(struct vx_core *chip, unsigned int port, unsigned int
vx2_inl(chip, port);
udelay(1);
}
- return 0;
}

/*
@@ -374,8 +374,7 @@ static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *x

image = xilinx->data;
for (i = 0; i < xilinx->size; i++, image++) {
- if (put_xilinx_data(chip, port, 8, *image) < 0)
- return -EINVAL;
+ put_xilinx_data(chip, port, 8, *image);
/* don't take too much time in this loop... */
cond_resched();
}
--
2.34.1