Skip to content

Commit b83587e

Browse files
ossilatortiwai
authored andcommitted
ALSA: emu10k1: make snd_emu1010_load_firmware_entry() void
There is only one call site, and there we already know that we actually have a firmware. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093717.3198716-3-oswald.buddenhagen@gmx.de>
1 parent 7868e4c commit b83587e

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

sound/pci/emu10k1/emu10k1_main.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -652,17 +652,14 @@ static int snd_emu10k1_cardbus_init(struct snd_emu10k1 *emu)
652652
return 0;
653653
}
654654

655-
static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
655+
static void snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
656656
const struct firmware *fw_entry)
657657
{
658658
int n, i;
659659
u16 reg;
660660
u8 value;
661661
__always_unused u16 write_post;
662662

663-
if (!fw_entry)
664-
return -EIO;
665-
666663
/* The FPGA is a Xilinx Spartan IIE XC2S50E */
667664
/* On E-MU 0404b it is a Xilinx Spartan III XC3S50 */
668665
/* GPIO7 -> FPGA PGMN
@@ -694,8 +691,6 @@ static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
694691
outw(0x10, emu->port + A_GPIO);
695692
write_post = inw(emu->port + A_GPIO);
696693
spin_unlock_irq(&emu->emu_lock);
697-
698-
return 0;
699694
}
700695

701696
/* firmware file names, per model, init-fw and dock-fw (optional) */
@@ -729,7 +724,8 @@ static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu, int dock,
729724
return err;
730725
}
731726

732-
return snd_emu1010_load_firmware_entry(emu, *fw);
727+
snd_emu1010_load_firmware_entry(emu, *fw);
728+
return 0;
733729
}
734730

735731
static void snd_emu1010_load_dock_firmware(struct snd_emu10k1 *emu)

0 commit comments

Comments
 (0)