Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / char / agp / parisc-agp.c
index 1c12921..17e380f 100644 (file)
@@ -358,8 +358,12 @@ parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa)
        bridge->dev = fake_bridge_dev;
 
        error = agp_add_bridge(bridge);
+       if (error)
+               goto fail;
+       return 0;
 
 fail:
+       kfree(fake_bridge_dev);
        return error;
 }