summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_drv.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-06-23 12:22:36 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-07-02 18:00:48 +0300
commitba6976c129a571464fccbbcf866f4f93d91113c0 (patch)
treef3018a70bec86a61544a81317282eef6107a6d79 /drivers/gpu/drm/drm_drv.c
parent0e975980d435d58df2d430d688b8c18778b42218 (diff)
downloadlinux-ba6976c129a571464fccbbcf866f4f93d91113c0.tar.xz
drm: Convert drm_legacy_ctxbitmap_init to void return type
It can't fail really. Also remove the redundant kms check Peter added. Cc: Peter Antoine <peter.antoine@intel.com> Reviewed-by: Peter Antoine <peter.antoine@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r--drivers/gpu/drm/drm_drv.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 838657503113..9b51fe11ff19 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -582,14 +582,7 @@ struct drm_device *drm_dev_alloc(struct drm_driver *driver,
if (drm_ht_create(&dev->map_hash, 12))
goto err_minors;
- if (drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) ||
- !drm_core_check_feature(dev, DRIVER_MODESET))
- ret = drm_legacy_ctxbitmap_init(dev);
- if (ret) {
- DRM_ERROR(
- "Cannot allocate memory for context bitmap.\n");
- goto err_ht;
- }
+ drm_legacy_ctxbitmap_init(dev);
if (drm_core_check_feature(dev, DRIVER_GEM)) {
ret = drm_gem_init(dev);
@@ -603,7 +596,6 @@ struct drm_device *drm_dev_alloc(struct drm_driver *driver,
err_ctxbitmap:
drm_legacy_ctxbitmap_cleanup(dev);
-err_ht:
drm_ht_remove(&dev->map_hash);
err_minors:
drm_minor_free(dev, DRM_MINOR_LEGACY);