Showing error 826

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


Source:

428        outb(0x03,     sec_dma_base + 0x01);
429        outb(pll_ctl1, sec_dma_base + 0x03);
430
431        /* Wait the PLL circuit to be stable */
432        mdelay(30);
433
434#ifdef DEBUG
435        /*
436         *  Show the current clock value of PLL control register
437         */
438        outb(0x02, sec_dma_base + 0x01);
439        pll_ctl0 = inb(sec_dma_base + 0x03);
440        outb(0x03, sec_dma_base + 0x01);
441        pll_ctl1 = inb(sec_dma_base + 0x03);
442
443        DBG("pll_ctl[%02X][%02X]\n", pll_ctl0, pll_ctl1);
444#endif
445
446 out:
447        return dev->irq;
448}
449
450static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
451{
452        struct pci_dev *dev2;
453
454        dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 1,
455                                                PCI_FUNC(dev->devfn)));
456
457        if (dev2 &&
458            dev2->vendor == dev->vendor &&
459            dev2->device == dev->device) {
460
461                if (dev2->irq != dev->irq) {
462                        dev2->irq = dev->irq;
463                        printk(KERN_INFO DRV_NAME " %s: PCI config space "
464                                "interrupt fixed\n", pci_name(dev));
465                }
466
467                return dev2;
468        }
Show full sources