summaryrefslogtreecommitdiffstats
path: root/sound/atmel/abdac.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-12-17 15:22:35 +0100
committerIngo Molnar <mingo@kernel.org>2013-12-17 15:22:35 +0100
commitffe732c2430c55074bebb172d33d909c662cd0e3 (patch)
treed39087d7b5d8caa505b23b6ea2abc2e33efa5be5 /sound/atmel/abdac.c
parent40ea2b42d7c44386cf81d5636d574193da2c8df2 (diff)
parent757dfcaa41844595964f1220f1d33182dae49976 (diff)
downloadblackbird-op-linux-ffe732c2430c55074bebb172d33d909c662cd0e3.tar.gz
blackbird-op-linux-ffe732c2430c55074bebb172d33d909c662cd0e3.zip
Merge branch 'sched/urgent' into sched/core
Merge the latest batch of fixes before applying development patches. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound/atmel/abdac.c')
-rw-r--r--sound/atmel/abdac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
index 872d59e35ee2..721d8fd45685 100644
--- a/sound/atmel/abdac.c
+++ b/sound/atmel/abdac.c
@@ -357,7 +357,8 @@ static int set_sample_rates(struct atmel_abdac *dac)
if (new_rate < 0)
break;
/* make sure we are below the ABDAC clock */
- if (new_rate <= clk_get_rate(dac->pclk)) {
+ if (index < MAX_NUM_RATES &&
+ new_rate <= clk_get_rate(dac->pclk)) {
dac->rates[index] = new_rate / 256;
index++;
}
OpenPOWER on IntegriCloud