Showing error 838

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/mtd/maps/ichxrom.c
Line in file: 359
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:40:13 UTC


Source:

329        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
330          PCI_ANY_ID, PCI_ANY_ID, },
331        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0,
332          PCI_ANY_ID, PCI_ANY_ID, },
333        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0,
334          PCI_ANY_ID, PCI_ANY_ID, },
335        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1,
336          PCI_ANY_ID, PCI_ANY_ID, },
337        { 0, },
338};
339
340#if 0
341MODULE_DEVICE_TABLE(pci, ichxrom_pci_tbl);
342
343static struct pci_driver ichxrom_driver = {
344        .name =                MOD_NAME,
345        .id_table =        ichxrom_pci_tbl,
346        .probe =        ichxrom_init_one,
347        .remove =        ichxrom_remove_one,
348};
349#endif
350
351static int __init init_ichxrom(void)
352{
353        struct pci_dev *pdev;
354        struct pci_device_id *id;
355
356        pdev = NULL;
357        for (id = ichxrom_pci_tbl; id->vendor; id++) {
358                pdev = pci_get_device(id->vendor, id->device, NULL);
359                if (pdev) {
360                        break;
361                }
362        }
363        if (pdev) {
364                return ichxrom_init_one(pdev, &ichxrom_pci_tbl[0]);
365        }
366        return -ENXIO;
367#if 0
368        return pci_register_driver(&ichxrom_driver);
369#endif
Show full sources