Showing error 886

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/video/sis/sis_main.c
Line in file: 4599
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:41:42 UTC


Source:

4569
4570#ifdef CONFIG_FB_SIS_315
4571#if 0
4572static void __devinit
4573sisfb_post_sis315330(struct pci_dev *pdev)
4574{
4575        /* TODO */
4576}
4577#endif
4578
4579static void __devinit
4580sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay)
4581{
4582        unsigned int i;
4583        u8 reg;
4584
4585        for(i = 0; i <= (delay * 10 * 36); i++) {
4586                inSISIDXREG(SISSR, 0x05, reg);
4587                reg++;
4588        }
4589}
4590
4591static int __devinit
4592sisfb_find_host_bridge(struct sis_video_info *ivideo, struct pci_dev *mypdev,
4593                                unsigned short pcivendor)
4594{
4595        struct pci_dev *pdev = NULL;
4596        unsigned short temp;
4597        int ret = 0;
4598
4599        while((pdev = pci_get_class(PCI_CLASS_BRIDGE_HOST, pdev))) {
4600                temp = pdev->vendor;
4601                if(temp == pcivendor) {
4602                        ret = 1;
4603                        pci_dev_put(pdev);
4604                        break;
4605                }
4606        }
4607
4608        return ret;
4609}
Show full sources