Properly initialize the dev_priv before calling the i915_dma_cleanup().
This fixes my rev. 1.5. Reviewed by: anholt Approved by: re (kensmith) MFC after: 2 weeks
This commit is contained in:
parent
8beae25391
commit
046ea980e1
@ -125,18 +125,17 @@ static int i915_initialize(drm_device_t * dev,
|
||||
drm_dma_handle_t *dmah;
|
||||
|
||||
DRM_UNLOCK();
|
||||
memset(dev_priv, 0, sizeof(drm_i915_private_t));
|
||||
dmah = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE,
|
||||
0xffffffff);
|
||||
DRM_LOCK();
|
||||
if (!dmah) {
|
||||
dev->dev_private = (void *)dev_priv;
|
||||
i915_dma_cleanup(dev);
|
||||
DRM_ERROR("Can not allocate hardware status page\n");
|
||||
DRM_LOCK();
|
||||
return DRM_ERR(ENOMEM);
|
||||
}
|
||||
DRM_LOCK();
|
||||
|
||||
memset(dev_priv, 0, sizeof(drm_i915_private_t));
|
||||
dev_priv->status_page_dmah = dmah;
|
||||
|
||||
DRM_GETSAREA();
|
||||
|
Loading…
Reference in New Issue
Block a user