Showing error 819

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


Source:

1533                .handle_irq = NULL,
1534                .evport_offset = SONYPI_TYPE1_OFFSET,
1535                .event_types = type1_events,
1536        },
1537        {
1538                .model = SONYPI_DEVICE_TYPE2,
1539                .handle_irq = NULL,
1540                .evport_offset = SONYPI_TYPE2_OFFSET,
1541                .event_types = type2_events,
1542        },
1543        {
1544                .model = SONYPI_DEVICE_TYPE3,
1545                .handle_irq = NULL,
1546                .evport_offset = SONYPI_TYPE3_OFFSET,
1547                .event_types = type3_events,
1548        },
1549        {
1550                .model = SONYPI_DEVICE_TYPE4,
1551                .handle_irq = type4_handle_irq,
1552                .evport_offset = SONYPI_TYPE4_OFFSET,
1553                .event_types = type4_events,
1554        },
1555};
1556
1557static void sony_pic_detect_device_type(struct sony_pic_dev *dev)
1558{
1559        struct pci_dev *pcidev;
1560
1561        pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
1562                        PCI_DEVICE_ID_INTEL_82371AB_3, NULL);
1563        if (pcidev) {
1564                dev->control = &spic_types[0];
1565                goto out;
1566        }
1567
1568        pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
1569                        PCI_DEVICE_ID_INTEL_ICH6_1, NULL);
1570        if (pcidev) {
1571                dev->control = &spic_types[2];
1572                goto out;
1573        }
Show full sources