From: Julia Lawall Date: Wed, 28 Nov 2007 10:58:56 +0000 (+0100) Subject: [ALSA] sound/core/memalloc.c: Add missing pci_dev_put X-Git-Tag: v2.6.25-rc1~1127^2~218 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df1deb67532ea26f1a033a5f48bf34b30bec8e1d;p=pandora-kernel.git [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. // @@ 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 ...; ) ...} // Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- Reading git-diff-tree failed