It's not leaking anything currently, as agp_alloc_bridge() doesn't do any
actual allocations right now, but if/when things get changed to support
multiple bridges, these error paths need to free up the allocation.
name);
return 0;
}
-
+
intel_i810_private.i810_dev = i810_dev;
return 1;
}
default:
printk(KERN_ERR PFX "Unsupported Intel chipset (device id: %04x)\n",
pdev->device);
+ agp_put_bridge(bridge);
return -ENODEV;
};
if (!r->start && r->end) {
if(pci_assign_resource(pdev, 0)) {
printk(KERN_ERR PFX "could not assign resource 0\n");
- return (-ENODEV);
+ agp_put_bridge(bridge);
+ return -ENODEV;
}
}
*/
if (pci_enable_device(pdev)) {
printk(KERN_ERR PFX "Unable to Enable PCI device\n");
- return (-ENODEV);
+ agp_put_bridge(bridge);
+ return -ENODEV;
}
/* Fill in the mode register */