diff --git a/drivers/staging/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/bcm2835-audio/bcm2835-pcm.c index d2d9f9b6a09b..014bf7ab69f4 100644 --- a/drivers/staging/bcm2835-audio/bcm2835-pcm.c +++ b/drivers/staging/bcm2835-audio/bcm2835-pcm.c @@ -130,7 +130,7 @@ static int snd_bcm2835_playback_open_generic( err = -EBUSY; goto out; } - if (idx > MAX_SUBSTREAMS) { + if (idx >= MAX_SUBSTREAMS) { audio_error ("substream(%d) device doesn't exist max(%d) substreams allowed\n", idx, MAX_SUBSTREAMS);