linux-stable/sound/pci
Dan Carpenter e4940626de ALSA: off by one bug in snd_riptide_joystick_probe()
The problem here is that we check:

	if (dev >= SNDRV_CARDS)

Then we increment "dev".

       if (!joystick_port[dev++])

Then we use it as an offset into a array with SNDRV_CARDS elements.

	if (!request_region(joystick_port[dev], 8, "Riptide gameport")) {

This has 3 effects:
1) If you use the module option to specify the joystick port then it has
   to be shifted one space over.
2) The wrong error message will be printed on failure if you have over
   32 cards.
3) Static checkers will correctly complain that are off by one.

Fixes: db1005ec6f ('ALSA: riptide - Fix joystick resource handling')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-09 14:57:15 +01:00
..
ac97 ALSA: ac97: Constify more text arrays 2014-10-21 08:51:45 +02:00
ali5451 ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
asihpi ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/* 2015-01-28 17:25:07 +01:00
au88x0 ALSA: au88x0: Remove superfluous ifdef __KERNEL__ 2015-01-28 17:26:45 +01:00
aw2 ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
ca0106 ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
cs46xx ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
cs5535audio ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
ctxfi Merge branch 'topic/pci-cleanup' into for-next 2015-01-11 11:26:48 +01:00
echoaudio ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
emu10k1 Merge branch 'topic/pci-cleanup' into for-next 2015-01-11 11:26:48 +01:00
hda ALSA: hda - Set up GPIO for Toshiba Satellite S50D 2015-02-05 22:12:07 +01:00
ice1712 Merge branch 'topic/ak411x-fix' into for-next 2015-01-28 22:32:10 +01:00
korg1212 ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
lola ALSA: Deletion of checks before the function call "iounmap" 2015-01-04 15:13:45 +01:00
lx6464es ALSA: Fix invalid kerneldoc markers 2014-11-11 09:39:17 +01:00
mixart ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
nm256 ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
oxygen ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
pcxhr ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
riptide ALSA: off by one bug in snd_riptide_joystick_probe() 2015-02-09 14:57:15 +01:00
rme9652 ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
trident ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
vx222 ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
ymfpci ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
ad1889.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
ad1889.h
ak4531_codec.c ALSA: pci: remove __dev* attributes 2012-12-07 07:20:55 +01:00
als300.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
als4000.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
atiixp.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
atiixp_modem.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
azt3328.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
azt3328.h
bt87x.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
cmipci.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
cs4281.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
cs5530.c ASoC: sb16: Simplify snd_sb16dsp_pcm() 2015-01-02 16:28:35 +01:00
ens1370.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
ens1371.c
es1938.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
es1968.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
fm801.c ALSA: fm801: remove FSF address 2015-01-11 11:27:13 +01:00
intel8x0.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
intel8x0m.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
Kconfig ALSA: add Studio Evolution SE6X support 2015-01-16 22:44:56 +01:00
maestro3.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
Makefile ALSA: Add the driver for Digigram Lola PCI-e boards 2011-05-03 16:31:05 +02:00
rme32.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
rme96.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
sis7019.c Merge branch 'topic/pci-cleanup' into for-next 2015-01-11 11:26:48 +01:00
sis7019.h
sonicvibes.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
via82xx.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
via82xx_modem.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00