diff options
Diffstat (limited to 'sound/pci/rme9652/hdspm.c')
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 103b4d715ff4..980b9cd689dd 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -474,7 +474,7 @@ static inline unsigned int hdspm_read(struct hdspm * hdspm, unsigned int reg) | |||
474 | static inline int hdspm_read_in_gain(struct hdspm * hdspm, unsigned int chan, | 474 | static inline int hdspm_read_in_gain(struct hdspm * hdspm, unsigned int chan, |
475 | unsigned int in) | 475 | unsigned int in) |
476 | { | 476 | { |
477 | if (chan > HDSPM_MIXER_CHANNELS || in > HDSPM_MIXER_CHANNELS) | 477 | if (chan >= HDSPM_MIXER_CHANNELS || in >= HDSPM_MIXER_CHANNELS) |
478 | return 0; | 478 | return 0; |
479 | 479 | ||
480 | return hdspm->mixer->ch[chan].in[in]; | 480 | return hdspm->mixer->ch[chan].in[in]; |
@@ -483,7 +483,7 @@ static inline int hdspm_read_in_gain(struct hdspm * hdspm, unsigned int chan, | |||
483 | static inline int hdspm_read_pb_gain(struct hdspm * hdspm, unsigned int chan, | 483 | static inline int hdspm_read_pb_gain(struct hdspm * hdspm, unsigned int chan, |
484 | unsigned int pb) | 484 | unsigned int pb) |
485 | { | 485 | { |
486 | if (chan > HDSPM_MIXER_CHANNELS || pb > HDSPM_MIXER_CHANNELS) | 486 | if (chan >= HDSPM_MIXER_CHANNELS || pb >= HDSPM_MIXER_CHANNELS) |
487 | return 0; | 487 | return 0; |
488 | return hdspm->mixer->ch[chan].pb[pb]; | 488 | return hdspm->mixer->ch[chan].pb[pb]; |
489 | } | 489 | } |