diff options
Diffstat (limited to 'drivers/char/drm/drm_stub.c')
-rw-r--r-- | drivers/char/drm/drm_stub.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c index 19408adcc775..59a9e7e5f128 100644 --- a/drivers/char/drm/drm_stub.c +++ b/drivers/char/drm/drm_stub.c | |||
@@ -59,6 +59,7 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, | |||
59 | { | 59 | { |
60 | int retcode; | 60 | int retcode; |
61 | 61 | ||
62 | INIT_LIST_HEAD(&dev->filelist); | ||
62 | spin_lock_init(&dev->count_lock); | 63 | spin_lock_init(&dev->count_lock); |
63 | spin_lock_init(&dev->drw_lock); | 64 | spin_lock_init(&dev->drw_lock); |
64 | spin_lock_init(&dev->tasklet_lock); | 65 | spin_lock_init(&dev->tasklet_lock); |
@@ -76,15 +77,12 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, | |||
76 | #endif | 77 | #endif |
77 | dev->irq = pdev->irq; | 78 | dev->irq = pdev->irq; |
78 | 79 | ||
79 | dev->maplist = drm_calloc(1, sizeof(*dev->maplist), DRM_MEM_MAPS); | ||
80 | if (dev->maplist == NULL) | ||
81 | return -ENOMEM; | ||
82 | INIT_LIST_HEAD(&dev->maplist->head); | ||
83 | if (drm_ht_create(&dev->map_hash, 12)) { | 80 | if (drm_ht_create(&dev->map_hash, 12)) { |
84 | drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS); | ||
85 | return -ENOMEM; | 81 | return -ENOMEM; |
86 | } | 82 | } |
87 | 83 | ||
84 | INIT_LIST_HEAD(&dev->maplist); | ||
85 | |||
88 | /* the DRM has 6 basic counters */ | 86 | /* the DRM has 6 basic counters */ |
89 | dev->counters = 6; | 87 | dev->counters = 6; |
90 | dev->types[0] = _DRM_STAT_LOCK; | 88 | dev->types[0] = _DRM_STAT_LOCK; |