Showing error 807

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


Source:

 40        outl(l, VPP_PORT);
 41}
 42
 43static struct map_info l440gx_map = {
 44        .name = "L440GX BIOS",
 45        .size = WINDOW_SIZE,
 46        .bankwidth = BUSWIDTH,
 47        .phys = WINDOW_ADDR,
 48#if 0
 49        /* FIXME verify that this is the
 50         * appripriate code for vpp enable/disable
 51         */
 52        .set_vpp = l440gx_set_vpp
 53#endif
 54};
 55
 56static int __init init_l440gx(void)
 57{
 58        struct pci_dev *dev, *pm_dev;
 59        struct resource *pm_iobase;
 60        __u16 word;
 61
 62        dev = pci_get_device(PCI_VENDOR_ID_INTEL,
 63                PCI_DEVICE_ID_INTEL_82371AB_0, NULL);
 64
 65        pm_dev = pci_get_device(PCI_VENDOR_ID_INTEL,
 66                PCI_DEVICE_ID_INTEL_82371AB_3, NULL);
 67
 68        pci_dev_put(dev);
 69
 70        if (!dev || !pm_dev) {
 71                printk(KERN_NOTICE "L440GX flash mapping: failed to find PIIX4 ISA bridge, cannot continue\n");
 72                pci_dev_put(pm_dev);
 73                return -ENODEV;
 74        }
 75
 76        l440gx_map.virt = ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE);
 77
 78        if (!l440gx_map.virt) {
 79                printk(KERN_WARNING "Failed to ioremap L440GX flash region\n");
 80                pci_dev_put(pm_dev);
Show full sources