Showing error 844

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


Source:

1991                                vmode_refresh;
1992                }
1993
1994                if (viaparinfo->lvds_setting_info->iga_path == IGA2) {
1995                        viaparinfo->lvds_setting_info->h_active = hres;
1996                        viaparinfo->lvds_setting_info->v_active = vres;
1997                        viaparinfo->lvds_setting_info->bpp = bpp;
1998                        viaparinfo->lvds_setting_info->refresh_rate =
1999                                vmode_refresh;
2000                }
2001                if (IGA2 == viaparinfo->lvds_setting_info2->iga_path) {
2002                        viaparinfo->lvds_setting_info2->h_active = hres;
2003                        viaparinfo->lvds_setting_info2->v_active = vres;
2004                        viaparinfo->lvds_setting_info2->bpp = bpp;
2005                        viaparinfo->lvds_setting_info2->refresh_rate =
2006                                vmode_refresh;
2007                }
2008        }
2009}
2010
2011static void init_gfx_chip_info(void)
2012{
2013        struct pci_dev *pdev = NULL;
2014        u32 i;
2015        u8 tmp;
2016
2017        /* Indentify GFX Chip Name */
2018        for (i = 0; pciidlist[i].vendor != 0; i++) {
2019                pdev = pci_get_device(pciidlist[i].vendor,
2020                        pciidlist[i].device, 0);
2021                if (pdev)
2022                        break;
2023        }
2024
2025        if (!pciidlist[i].vendor)
2026                return ;
2027
2028        viaparinfo->chip_info->gfx_chip_name = pciidlist[i].chip_index;
2029
2030        /* Check revision of CLE266 Chip */
2031        if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_CLE266) {
Show full sources