Showing error 593

User: Jiri Slaby
Error type: Double Resource Put
Error type description: There is a try to return some resource to the system twice
File location: drivers/edac/e752x_edac.c
Line in file: 1246
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:28 UTC


Source:

1216                        pvt->tolm, pvt->remapbase, pvt->remaplimit);
1217
1218        /* Here we assume that we will never see multiple instances of this
1219         * type of memory controller.  The ID is therefore hardcoded to 0.
1220         */
1221        if (edac_mc_add_mc(mci)) {
1222                debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
1223                goto fail;
1224        }
1225
1226        e752x_init_error_reporting_regs(pvt);
1227        e752x_get_error_info(mci, &discard);        /* clear other MCH errors */
1228
1229        /* allocating generic PCI control info */
1230        e752x_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR);
1231        if (!e752x_pci) {
1232                printk(KERN_WARNING
1233                        "%s(): Unable to create PCI control\n", __func__);
1234                printk(KERN_WARNING
1235                        "%s(): PCI error report via EDAC not setup\n",
1236                        __func__);
1237        }
1238
1239        /* get this far and it's successful */
1240        debugf3("%s(): success\n", __func__);
1241        return 0;
1242
1243fail:
1244        pci_dev_put(pvt->dev_d0f0);
1245        pci_dev_put(pvt->dev_d0f1);
1246        pci_dev_put(pvt->bridge_ck);
1247        edac_mc_free(mci);
1248
1249        return -ENODEV;
1250}
1251
1252/* returns count (>= 0), or negative on error */
1253static int __devinit e752x_init_one(struct pci_dev *pdev,
1254                                const struct pci_device_id *ent)
1255{
1256        debugf0("%s()\n", __func__);
Show full sources