diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2007-08-04 14:30:58 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-08-05 17:30:20 -0400 |
commit | db7f3ded8d42c60b0d0a4f71d621e105790b872b (patch) | |
tree | e9eaa68ad0fea1cdf163e824fbd0ac3c52866e61 /drivers/char/agp | |
parent | d4ac2477fad0f2680e84ec12e387ce67682c5c13 (diff) |
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: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/agp')
-rw-r--r-- | drivers/char/agp/efficeon-agp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index df8da7262853..d78cd09186aa 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c | |||
@@ -375,6 +375,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev, | |||
375 | if (!r->start && r->end) { | 375 | if (!r->start && r->end) { |
376 | if (pci_assign_resource(pdev, 0)) { | 376 | if (pci_assign_resource(pdev, 0)) { |
377 | printk(KERN_ERR PFX "could not assign resource 0\n"); | 377 | printk(KERN_ERR PFX "could not assign resource 0\n"); |
378 | agp_put_bridge(bridge); | ||
378 | return -ENODEV; | 379 | return -ENODEV; |
379 | } | 380 | } |
380 | } | 381 | } |
@@ -386,6 +387,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev, | |||
386 | */ | 387 | */ |
387 | if (pci_enable_device(pdev)) { | 388 | if (pci_enable_device(pdev)) { |
388 | printk(KERN_ERR PFX "Unable to Enable PCI device\n"); | 389 | printk(KERN_ERR PFX "Unable to Enable PCI device\n"); |
390 | agp_put_bridge(bridge); | ||
389 | return -ENODEV; | 391 | return -ENODEV; |
390 | } | 392 | } |
391 | 393 | ||