From 151fc5dfc87964e85a1cbbb9cc2c0703c017c2ed Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Tue, 20 Nov 2007 08:41:16 +0100 Subject: [PATCH] PCI: drivers/pci/pci-sysfs.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. This was fixed using the following semantic patch. // @@ identifier d; type T; expression e; iterator for_each_pci_dev; @@ T *d; ... for_each_pci_dev(d) {... when != pci_dev_put(d) when != e = d ( return d; | + pci_dev_put(d); ? return ...; ) ...} // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed