summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
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;
}