summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/parisc-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/parisc-agp.c')
-rw-r--r--drivers/char/agp/parisc-agp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c
index 1c129211302d..17e380f5f818 100644
--- a/drivers/char/agp/parisc-agp.c
+++ b/drivers/char/agp/parisc-agp.c
@@ -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;
}
OpenPOWER on IntegriCloud