i915: Only look up dev_priv->mmio_map if it's not already set up

This commit is contained in:
Kristian Høgsberg 2008-02-12 16:08:18 -05:00 committed by Kristian Høgsberg
parent ee15459483
commit db3f03ae35

View file

@ -117,7 +117,8 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
return -EINVAL;
}
dev_priv->mmio_map = drm_core_findmap(dev, init->mmio_offset);
if (init->mmio_offset != 0)
dev_priv->mmio_map = drm_core_findmap(dev, init->mmio_offset);
if (!dev_priv->mmio_map) {
i915_dma_cleanup(dev);
DRM_ERROR("can not find mmio map!\n");