linux/sound
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
..
aoa Merge branch 'topic/snd-device' into for-next 2015-02-03 17:57:16 +01:00
arm ALSA: Deletion of checks before the function call "iounmap" 2015-01-04 15:13:45 +01:00
atmel ALSA: sound/atmel/ac97c.c: Add device tree support 2015-01-07 07:56:19 +01:00
core Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next 2015-02-09 15:10:02 +08:00
drivers ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/* 2015-01-28 17:25:07 +01:00
firewire ALSA: firewire-lib: limit the MIDI data rate 2015-01-16 22:51:23 +01:00
i2c Merge branch 'topic/ak411x-fix' into for-next 2015-01-28 22:32:10 +01:00
isa ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/* 2015-01-28 17:25:07 +01:00
mips Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
oss sound/oss: use current->state helpers 2015-01-15 08:32:27 +01:00
parisc ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
pci ALSA: off by one bug in snd_riptide_joystick_probe() 2015-02-09 14:57:15 +01:00
pcmcia ALSA: vx: Fix missing kerneldoc parameter descriptions 2014-11-11 09:39:10 +01:00
ppc ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
sh ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
soc ASoC: Final updates for v3.20 2015-02-09 08:54:50 +01:00
sparc ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
spi
synth ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/* 2015-01-28 17:25:07 +01:00
usb ALSA: line6: Pass driver name to line6_probe() 2015-02-08 09:07:07 +01:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c
sound_firmware.c