diff options
Diffstat (limited to 'sound/pci/es1968.c')
-rw-r--r-- | sound/pci/es1968.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index 1bf298d214b9..20ee7599600b 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -692,7 +692,8 @@ static void apu_data_set(struct es1968 *chip, u16 data) | |||
692 | /* no spinlock */ | 692 | /* no spinlock */ |
693 | static void __apu_set_register(struct es1968 *chip, u16 channel, u8 reg, u16 data) | 693 | static void __apu_set_register(struct es1968 *chip, u16 channel, u8 reg, u16 data) |
694 | { | 694 | { |
695 | snd_assert(channel < NR_APUS, return); | 695 | if (snd_BUG_ON(channel >= NR_APUS)) |
696 | return; | ||
696 | #ifdef CONFIG_PM | 697 | #ifdef CONFIG_PM |
697 | chip->apu_map[channel][reg] = data; | 698 | chip->apu_map[channel][reg] = data; |
698 | #endif | 699 | #endif |
@@ -711,7 +712,8 @@ static void apu_set_register(struct es1968 *chip, u16 channel, u8 reg, u16 data) | |||
711 | 712 | ||
712 | static u16 __apu_get_register(struct es1968 *chip, u16 channel, u8 reg) | 713 | static u16 __apu_get_register(struct es1968 *chip, u16 channel, u8 reg) |
713 | { | 714 | { |
714 | snd_assert(channel < NR_APUS, return 0); | 715 | if (snd_BUG_ON(channel >= NR_APUS)) |
716 | return 0; | ||
715 | reg |= (channel << 4); | 717 | reg |= (channel << 4); |
716 | apu_index_set(chip, reg); | 718 | apu_index_set(chip, reg); |
717 | return __maestro_read(chip, IDR0_DATA_PORT); | 719 | return __maestro_read(chip, IDR0_DATA_PORT); |