summaryrefslogtreecommitdiff
path: root/linux-core/drm_stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_stub.c')
-rw-r--r--linux-core/drm_stub.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index 6ba6f6e1..24955634 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -82,6 +82,10 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
if (dev->maplist == NULL)
return -ENOMEM;
INIT_LIST_HEAD(&dev->maplist->head);
+ if (drm_ht_create(&dev->map_hash, 12)) {
+ drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS);
+ return -ENOMEM;
+ }
/* the DRM has 6 counters */
dev->counters = 6;