diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-08 11:11:45 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-13 05:46:36 -0400 |
commit | 622207dc31895b4e82c39100db8635d885c795e2 (patch) | |
tree | cbfd03ebe9caa2564924c76f2ca28bc348a68c87 /sound/isa/sb/sb_mixer.c | |
parent | 7eaa943c8ed8e91e05d0f5d0dc7a18e3319b45cf (diff) |
ALSA: Kill snd_assert() in sound/isa/*
Kill snd_assert() in sound/isa/*, either removed or replaced with
if () with snd_BUG_ON().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/isa/sb/sb_mixer.c')
-rw-r--r-- | sound/isa/sb/sb_mixer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c index 73d4572d136b..406a431af91e 100644 --- a/sound/isa/sb/sb_mixer.c +++ b/sound/isa/sb/sb_mixer.c | |||
@@ -792,7 +792,8 @@ int snd_sbmixer_new(struct snd_sb *chip) | |||
792 | struct snd_card *card; | 792 | struct snd_card *card; |
793 | int err; | 793 | int err; |
794 | 794 | ||
795 | snd_assert(chip != NULL && chip->card != NULL, return -EINVAL); | 795 | if (snd_BUG_ON(!chip || !chip->card)) |
796 | return -EINVAL; | ||
796 | 797 | ||
797 | card = chip->card; | 798 | card = chip->card; |
798 | 799 | ||
@@ -925,7 +926,8 @@ static unsigned char als4000_saved_regs[] = { | |||
925 | static void save_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) | 926 | static void save_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) |
926 | { | 927 | { |
927 | unsigned char *val = chip->saved_regs; | 928 | unsigned char *val = chip->saved_regs; |
928 | snd_assert(num_regs <= ARRAY_SIZE(chip->saved_regs), return); | 929 | if (snd_BUG_ON(num_regs > ARRAY_SIZE(chip->saved_regs))) |
930 | return; | ||
929 | for (; num_regs; num_regs--) | 931 | for (; num_regs; num_regs--) |
930 | *val++ = snd_sbmixer_read(chip, *regs++); | 932 | *val++ = snd_sbmixer_read(chip, *regs++); |
931 | } | 933 | } |
@@ -933,7 +935,8 @@ static void save_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) | |||
933 | static void restore_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) | 935 | static void restore_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) |
934 | { | 936 | { |
935 | unsigned char *val = chip->saved_regs; | 937 | unsigned char *val = chip->saved_regs; |
936 | snd_assert(num_regs <= ARRAY_SIZE(chip->saved_regs), return); | 938 | if (snd_BUG_ON(num_regs > ARRAY_SIZE(chip->saved_regs))) |
939 | return; | ||
937 | for (; num_regs; num_regs--) | 940 | for (; num_regs; num_regs--) |
938 | snd_sbmixer_write(chip, *regs++, *val++); | 941 | snd_sbmixer_write(chip, *regs++, *val++); |
939 | } | 942 | } |