]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/char/drm/drm_stub.c
drm: update user token hashing and map handles
[net-next-2.6.git] / drivers / char / drm / drm_stub.c
index b1ead37c51d6295c30bdb887520ad5d998c18e28..a9bb18ac3a2b35d0bf82516e93df3574f104e75b 100644 (file)
@@ -75,6 +75,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 basic counters */
        dev->counters = 6;