Commit db7f3ded authored by Jesper Juhl's avatar Jesper Juhl Committed by Dave Airlie

efficeon-agp leaks 'struct agp_bridge_data' in error paths of agp_efficeon_probe()

(This is a resend of a patch originally submitted on 24-Jul-2007 00:14)

Ok, this is something the coverity checker found (CID: 1813).
I'm not at all intimate with this code, so I'm not sure if this
attempt at a fix is correct (but at least it compiles).

Please look it over and NACK if bad or merge if good ;-)
Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent d4ac2477
...@@ -375,6 +375,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev, ...@@ -375,6 +375,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
if (!r->start && r->end) { if (!r->start && r->end) {
if (pci_assign_resource(pdev, 0)) { if (pci_assign_resource(pdev, 0)) {
printk(KERN_ERR PFX "could not assign resource 0\n"); printk(KERN_ERR PFX "could not assign resource 0\n");
agp_put_bridge(bridge);
return -ENODEV; return -ENODEV;
} }
} }
...@@ -386,6 +387,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev, ...@@ -386,6 +387,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
*/ */
if (pci_enable_device(pdev)) { if (pci_enable_device(pdev)) {
printk(KERN_ERR PFX "Unable to Enable PCI device\n"); printk(KERN_ERR PFX "Unable to Enable PCI device\n");
agp_put_bridge(bridge);
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment