aboutsummaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorGareth Hughes <gareth@users.sourceforge.net>2000-07-01 01:50:00 +0000
committerGareth Hughes <gareth@users.sourceforge.net>2000-07-01 01:50:00 +0000
commit62838b948cdddc0f007c200fbec195c1a008c731 (patch)
tree88fbef05715fc833f4cc6f700471cef01db25489 /linux-core
parentdc2701a9f6034a04319f71e43e7f928f818be6db (diff)
Fix for agpgart module detection. If the kernel module has been configured
to use AGP, and the module is not present, fail gracefully instead of doing evil things.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/r128_drv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux-core/r128_drv.c b/linux-core/r128_drv.c
index 8b669888..4c065551 100644
--- a/linux-core/r128_drv.c
+++ b/linux-core/r128_drv.c
@@ -369,6 +369,13 @@ int r128_init(void)
#ifdef DRM_AGP
dev->agp = drm_agp_init();
+ if (dev->agp == NULL) {
+ DRM_ERROR("Cannot initialize agpgart module.\n");
+ drm_proc_cleanup();
+ misc_deregister(&r128_misc);
+ r128_takedown(dev);
+ return -ENOMEM;
+ }
#ifdef CONFIG_MTRR
dev->agp->agp_mtrr = mtrr_add(dev->agp->agp_info.aper_base,