GIT db7f3ded8d42c60b0d0a4f71d621e105790b872b git+ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6.git#agp-mm commit Author: Jesper Juhl Date: Sat Aug 4 20:30:58 2007 +0200 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 Signed-off-by: Dave Airlie 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 df8da72..d78cd09 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( if (!r->start && r->end) { if (pci_assign_resource(pdev, 0)) { printk(KERN_ERR PFX "could not assign resource 0\n"); + agp_put_bridge(bridge); return -ENODEV; } } @@ -386,6 +387,7 @@ static int __devinit agp_efficeon_probe( */ if (pci_enable_device(pdev)) { printk(KERN_ERR PFX "Unable to Enable PCI device\n"); + agp_put_bridge(bridge); return -ENODEV; }