Showing error 855

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


Source:

297        amd76xrom_cleanup(window);
298}
299
300static struct pci_device_id amd76xrom_pci_tbl[] = {
301        { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410,
302                PCI_ANY_ID, PCI_ANY_ID, },
303        { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7440,
304                PCI_ANY_ID, PCI_ANY_ID, },
305        { PCI_VENDOR_ID_AMD, 0x7468 }, /* amd8111 support */
306        { 0, }
307};
308
309MODULE_DEVICE_TABLE(pci, amd76xrom_pci_tbl);
310
311#if 0
312static struct pci_driver amd76xrom_driver = {
313        .name =                MOD_NAME,
314        .id_table =        amd76xrom_pci_tbl,
315        .probe =        amd76xrom_init_one,
316        .remove =        amd76xrom_remove_one,
317};
318#endif
319
320static int __init init_amd76xrom(void)
321{
322        struct pci_dev *pdev;
323        struct pci_device_id *id;
324        pdev = NULL;
325        for(id = amd76xrom_pci_tbl; id->vendor; id++) {
326                pdev = pci_get_device(id->vendor, id->device, NULL);
327                if (pdev) {
328                        break;
329                }
330        }
331        if (pdev) {
332                return amd76xrom_init_one(pdev, &amd76xrom_pci_tbl[0]);
333        }
334        return -ENXIO;
335#if 0
336        return pci_register_driver(&amd76xrom_driver);
337#endif
Show full sources