linux/sound/core
Julia Lawall df1deb6753 [ALSA] sound/core/memalloc.c: Add missing pci_dev_put
There should be a pci_dev_put when breaking out of a loop that iterates
over calls to pci_get_device and similar functions.
In this case, the return under the initial if needs a pci_dev_put in the
same way that the return under the subsequent for loop has a pci_dev_put.
This was fixed using the following semantic patch.
// <smpl>
@@
type T;
identifier d;
expression e;
@@
T *d;
...
while ((d = \(pci_get_device\|pci_get_device_reverse\|pci_get_subsys\|pci_get_class\)(..., d)) != NULL)
  {... when != pci_dev_put(d)
       when != e = d
(
    return d;
|
+  pci_dev_put(d);
?  return ...;
)
...}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:30 +01:00
..
oss snd_mixer_oss_build_input(): fix for __you_cannot_kmalloc_that_much failure with gcc-3.2 2008-01-08 16:10:36 -08:00
seq [ALSA] Remove sequencer instrument layer 2008-01-31 17:29:13 +01:00
control_compat.c [ALSA] alsa core: convert to list_for_each_entry* 2007-02-09 09:00:10 +01:00
control.c [ALSA] sound/core/control.c: hard-irq-safe -> hard-irq-unsafe lock warning 2007-10-23 08:07:55 +02:00
device.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
hwdep_compat.c [PATCH] hwdep_compat missed __user annotations 2006-10-10 15:37:21 -07:00
hwdep.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
info_oss.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
info.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
init.c [ALSA] Introduce slots option to snd module 2008-01-31 17:29:11 +01:00
isadma.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
Kconfig misc doc and kconfig typos 2007-05-09 08:58:15 +02:00
Makefile [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
memalloc.c [ALSA] sound/core/memalloc.c: Add missing pci_dev_put 2008-01-31 17:29:30 +01:00
memory.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
misc.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
pcm_compat.c [ALSA] Fix control/status mmap with shared PCM substream 2006-09-23 10:39:50 +02:00
pcm_lib.c [ALSA] Fix PCM MMAP time-stamp mode 2008-01-31 17:29:28 +01:00
pcm_memory.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
pcm_misc.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
pcm_native.c [ALSA] Fix PCM MMAP time-stamp mode 2008-01-31 17:29:28 +01:00
pcm_timer.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
pcm.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
rawmidi_compat.c [ALSA] Remove xxx_t typedefs: Raw MIDI 2006-01-03 12:17:35 +01:00
rawmidi.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
rtctimer.c [ALSA] is_power_of_2 in rtctimer.c 2007-05-11 16:55:42 +02:00
sgbuf.c [ALSA] use the ALIGN macro 2006-12-20 08:55:36 +01:00
sound_oss.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
sound.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
timer_compat.c [ALSA] Remove xxx_t typedefs: Timer 2006-01-03 12:17:34 +01:00
timer.c [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00