Showing error 824

User: Jiri Slaby
Error type: Resource Leak
Error type description: The code omits to put the resource to the system for reuse
File location: drivers/pci/hotplug/cpci_hotplug_pci.c
Line in file: 267
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:40:13 UTC


Source:

237                                              slot->devfn,
238                                              hs_cap + 2,
239                                              hs_csr)) {
240                        err("Could not clear LOO for slot %s",
241                            hotplug_slot_name(slot->hotplug_slot));
242                        return -ENODEV;
243                }
244        }
245        return 0;
246}
247
248
249/*
250 * Device configuration functions
251 */
252
253int __ref cpci_configure_slot(struct slot *slot)
254{
255        struct pci_bus *parent;
256        int fn;
257
258        dbg("%s - enter", __func__);
259
260        if (slot->dev == NULL) {
261                dbg("pci_dev null, finding %02x:%02x:%x",
262                    slot->bus->number, PCI_SLOT(slot->devfn), PCI_FUNC(slot->devfn));
263                slot->dev = pci_get_slot(slot->bus, slot->devfn);
264        }
265
266        /* Still NULL? Well then scan for it! */
267        if (slot->dev == NULL) {
268                int n;
269                dbg("pci_dev still null");
270
271                /*
272                 * This will generate pci_dev structures for all functions, but
273                 * we will only call this case when lookup fails.
274                 */
275                n = pci_scan_slot(slot->bus, slot->devfn);
276                dbg("%s: pci_scan_slot returned %d", __func__, n);
277                slot->dev = pci_get_slot(slot->bus, slot->devfn);
Show full sources