From b05fa16c080785cae4e5c969c70bd3b9345a67a8 Mon Sep 17 00:00:00 2001 From: Torsten Schenk Date: Thu, 16 Jun 2011 21:06:27 +0200 Subject: [PATCH] --- yaml --- r: 253768 b: refs/heads/master c: 0ec5258d68c626922d92e2f0e4e5c689e5360a5d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/usb/6fire/pcm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index c983d5275a60..b7ca7891ad7b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e72888e91cc902ccdc089f237b6eed7587e2b4df +refs/heads/master: 0ec5258d68c626922d92e2f0e4e5c689e5360a5d diff --git a/trunk/sound/usb/6fire/pcm.c b/trunk/sound/usb/6fire/pcm.c index b137b25865cc..d144cdb2f159 100644 --- a/trunk/sound/usb/6fire/pcm.c +++ b/trunk/sound/usb/6fire/pcm.c @@ -395,12 +395,12 @@ static int usb6fire_pcm_open(struct snd_pcm_substream *alsa_sub) alsa_rt->hw = pcm_hw; if (alsa_sub->stream == SNDRV_PCM_STREAM_PLAYBACK) { - if (rt->rate >= 0) + if (rt->rate < ARRAY_SIZE(rates)) alsa_rt->hw.rates = rates_alsaid[rt->rate]; alsa_rt->hw.channels_max = OUT_N_CHANNELS; sub = &rt->playback; } else if (alsa_sub->stream == SNDRV_PCM_STREAM_CAPTURE) { - if (rt->rate >= 0) + if (rt->rate < ARRAY_SIZE(rates)) alsa_rt->hw.rates = rates_alsaid[rt->rate]; alsa_rt->hw.channels_max = IN_N_CHANNELS; sub = &rt->capture;