Showing error 820

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


Source:

150        }
151        if (cur & CRVML_PANEL_ON) {
152                schedule_timeout(HZ / 10);
153                outl(cur & ~CRVML_PANEL_ON, addr);
154        }
155}
156
157static int cr_lcd_set_power(struct lcd_device *ld, int power)
158{
159        if (power == FB_BLANK_UNBLANK)
160                cr_panel_on();
161        if (power == FB_BLANK_POWERDOWN)
162                cr_panel_off();
163
164        return 0;
165}
166
167static struct lcd_ops cr_lcd_ops = {
168        .set_power = cr_lcd_set_power,
169};
170
171static int cr_backlight_probe(struct platform_device *pdev)
172{
173        struct backlight_device *bdp;
174        struct lcd_device *ldp;
175        struct cr_panel *crp;
176        u8 dev_en;
177
178        lpc_dev = pci_get_device(PCI_VENDOR_ID_INTEL,
179                                        CRVML_DEVICE_LPC, NULL);
180        if (!lpc_dev) {
181                printk("INTEL CARILLO RANCH LPC not found.\n");
182                return -ENODEV;
183        }
184
185        pci_read_config_byte(lpc_dev, CRVML_REG_GPIOEN, &dev_en);
186        if (!(dev_en & CRVML_GPIOEN_BIT)) {
187                printk(KERN_ERR
188                       "Carillo Ranch GPIO device was not enabled.\n");
189                pci_dev_put(lpc_dev);
190                return -ENODEV;
Show full sources