android_kernel_google_msm/sound
Dan Carpenter 26ea9e4d43 ALSA: off by one bug in snd_riptide_joystick_probe()
commit e4940626defdf6c92da1052ad3f12741c1a28c90 upstream.

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>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-06-19 11:40:14 +08:00
..
aoa
arm ALSA: pxa2xx: Fix unlocked snd_pcm_stop() call 2014-03-11 16:10:09 -07:00
atmel
core ALSA: seq-dummy: remove deadlock-causing events on close 2015-04-14 17:33:56 +08:00
drivers ALSA: pcsp: Fix the order of input device unregistration 2014-04-14 06:44:31 -07:00
firewire
i2c ALSA: ak411x: Fix stall in work callback 2015-04-14 17:33:59 +08:00
isa ALSA: msnd: Avoid duplicated driver name 2013-11-29 10:50:34 -08:00
mips
oss sound: Fix make allmodconfig on MIPS correctly 2013-08-20 08:26:27 -07:00
parisc
pci ALSA: off by one bug in snd_riptide_joystick_probe() 2015-06-19 11:40:14 +08:00
pcmcia
ppc
sh
soc ASoC: sgtl5000: add delay before first I2C access 2015-04-14 17:34:00 +08:00
sparc
spi
synth
usb ALSA: usb-audio: Add mic volume fix quirk for Logitech Webcam C210 2015-04-14 17:33:54 +08:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c
sound_firmware.c