summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-09-18 10:19:08 +1000
committerDave Airlie <airlied@linux.ie>2008-09-18 10:19:08 +1000
commit8f38c28a3924dbda5babcf035911e103f27f9a05 (patch)
tree9f15d5b72fb77cf79b59ccc6f433343862d84e55 /shared-core
parent515aa0800cf2d91bdf4706463e0531c5081a2679 (diff)
radeon: fail properly if we can't create the ring.
Normally this will be due to an AGP driver needing updating
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/radeon_cp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index 63957cd7..6c5bf03b 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -2549,7 +2549,9 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
- radeon_gem_mm_init(dev);
+ ret = radeon_gem_mm_init(dev);
+ if (ret)
+ goto modeset_fail;
radeon_modeset_init(dev);
radeon_modeset_cp_init(dev);
@@ -2560,6 +2562,10 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
return ret;
+modeset_fail:
+ dev->driver->driver_features &= ~DRIVER_MODESET;
+ drm_put_minor(&dev->control);
+ return ret;
}