Showing error 840

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


Source:

1016                        pvt->map[index] = 0xff;
1017                        pvt->map[index + 1] = 0xff;
1018                } else {        /* there is a dimm in the slot */
1019                        pvt->map[index] = row;
1020                        row++;
1021                        last = value;
1022                        /* test the next value to see if the dimm is double
1023                         * sided
1024                         */
1025                        pci_read_config_byte(pdev, E752X_DRB + index + 1,
1026                                        &value);
1027
1028                        /* the dimm is single sided, so flag as empty */
1029                        /* this is a double sided dimm to save the next row #*/
1030                        pvt->map[index + 1] = (value == last) ? 0xff :        row;
1031                        row++;
1032                        last = value;
1033                }
1034        }
1035}
1036
1037/* Return 0 on success or 1 on failure. */
1038static int e752x_get_devs(struct pci_dev *pdev, int dev_idx,
1039                        struct e752x_pvt *pvt)
1040{
1041        struct pci_dev *dev;
1042
1043        pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL,
1044                                pvt->dev_info->err_dev, pvt->bridge_ck);
1045
1046        if (pvt->bridge_ck == NULL)
1047                pvt->bridge_ck = pci_scan_single_device(pdev->bus,
1048                                                        PCI_DEVFN(0, 1));
1049
1050        if (pvt->bridge_ck == NULL) {
1051                e752x_printk(KERN_ERR, "error reporting device not found:"
1052                        "vendor %x device 0x%x (broken BIOS?)\n",
1053                        PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].err_dev);
1054                return 1;
1055        }
1056
Show full sources