staging: bcm2835-audio: off by one in snd_bcm2835_playback_open_generic()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 7 Feb 2017 13:17:07 +0000 (16:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2017 12:16:45 +0000 (13:16 +0100)
commit84472ecd7074576143aaf2772a304138fa4f1a09
tree06b105d3dde0a5075dde49a2e3a63bc0645032ba
parent1605cda06ba58f1b3b9570ae9ea13e9793aeca2a
staging: bcm2835-audio: off by one in snd_bcm2835_playback_open_generic()

The > should be >= otherwise we write beyond the end of the array when
we do:

chip->alsa_stream[idx] = alsa_stream;

Fixes: 23b028c871e1 ("staging: bcm2835-audio: initial staging submission")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm2835-audio/bcm2835-pcm.c