diff options
Diffstat (limited to 'sound/isa/opti9xx/miro.c')
-rw-r--r-- | sound/isa/opti9xx/miro.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index d295936611f..2a1e2f5d12c 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <sound/driver.h> | ||
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
27 | #include <linux/err.h> | 26 | #include <linux/err.h> |
28 | #include <linux/isa.h> | 27 | #include <linux/isa.h> |
@@ -483,6 +482,10 @@ static int snd_miro_put_double(struct snd_kcontrol *kcontrol, | |||
483 | 482 | ||
484 | /* equalizer elements */ | 483 | /* equalizer elements */ |
485 | 484 | ||
485 | if (left < -0x7f || left > 0x7f || | ||
486 | right < -0x7f || right > 0x7f) | ||
487 | return -EINVAL; | ||
488 | |||
486 | if (left_old > 0x80) | 489 | if (left_old > 0x80) |
487 | left_old = 0x80 - left_old; | 490 | left_old = 0x80 - left_old; |
488 | if (right_old > 0x80) | 491 | if (right_old > 0x80) |
@@ -520,6 +523,10 @@ static int snd_miro_put_double(struct snd_kcontrol *kcontrol, | |||
520 | 523 | ||
521 | /* non-equalizer elements */ | 524 | /* non-equalizer elements */ |
522 | 525 | ||
526 | if (left < 0 || left > 0x20 || | ||
527 | right < 0 || right > 0x20) | ||
528 | return -EINVAL; | ||
529 | |||
523 | left_old = 0x20 - left_old; | 530 | left_old = 0x20 - left_old; |
524 | right_old = 0x20 - right_old; | 531 | right_old = 0x20 - right_old; |
525 | 532 | ||
@@ -662,7 +669,7 @@ static int __devinit snd_set_aci_init_values(struct snd_miro *miro) | |||
662 | return 0; | 669 | return 0; |
663 | } | 670 | } |
664 | 671 | ||
665 | static int snd_miro_mixer(struct snd_miro *miro) | 672 | static int __devinit snd_miro_mixer(struct snd_miro *miro) |
666 | { | 673 | { |
667 | struct snd_card *card; | 674 | struct snd_card *card; |
668 | unsigned int idx; | 675 | unsigned int idx; |