diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-07-09 16:34:25 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-07-09 16:34:25 -0400 |
commit | f974a8ec96571535ee07880a023bcce0e3f2c76b (patch) | |
tree | 5cf09207b1ad292a55275cd0b24999fa29b9dfe8 /sound/isa/sb/sb_mixer.c | |
parent | c0b8556f2f8146bd38324b14b1ce00f249ba8ed9 (diff) | |
parent | 4ed47896935573c8423d05bddda3f269d6e6c613 (diff) |
Merge branch 'machtypes' into pxa-palm
Diffstat (limited to 'sound/isa/sb/sb_mixer.c')
-rw-r--r-- | sound/isa/sb/sb_mixer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c index 91d14224f6b3..73d4572d136b 100644 --- a/sound/isa/sb/sb_mixer.c +++ b/sound/isa/sb/sb_mixer.c | |||
@@ -925,7 +925,7 @@ static unsigned char als4000_saved_regs[] = { | |||
925 | static void save_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) | 925 | static void save_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) |
926 | { | 926 | { |
927 | unsigned char *val = chip->saved_regs; | 927 | unsigned char *val = chip->saved_regs; |
928 | snd_assert(num_regs > ARRAY_SIZE(chip->saved_regs), return); | 928 | snd_assert(num_regs <= ARRAY_SIZE(chip->saved_regs), return); |
929 | for (; num_regs; num_regs--) | 929 | for (; num_regs; num_regs--) |
930 | *val++ = snd_sbmixer_read(chip, *regs++); | 930 | *val++ = snd_sbmixer_read(chip, *regs++); |
931 | } | 931 | } |
@@ -933,7 +933,7 @@ 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) | 933 | static void restore_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) |
934 | { | 934 | { |
935 | unsigned char *val = chip->saved_regs; | 935 | unsigned char *val = chip->saved_regs; |
936 | snd_assert(num_regs > ARRAY_SIZE(chip->saved_regs), return); | 936 | snd_assert(num_regs <= ARRAY_SIZE(chip->saved_regs), return); |
937 | for (; num_regs; num_regs--) | 937 | for (; num_regs; num_regs--) |
938 | snd_sbmixer_write(chip, *regs++, *val++); | 938 | snd_sbmixer_write(chip, *regs++, *val++); |
939 | } | 939 | } |