drm/i915: release cursor when crtc is destroyed
[deliverable/linux.git] / drivers / gpu / drm / i915 / intel_ringbuffer.c
index 5698faeee6f6176982a336f9e68aaebc923135e1..9b97cf66a5ae8234b5a26aaf337476fe80b5b710 100644 (file)
@@ -464,9 +464,11 @@ init_pipe_control(struct intel_ring_buffer *ring)
                goto err_unref;
 
        pc->gtt_offset = obj->gtt_offset;
-       pc->cpu_page =  kmap(sg_page(obj->pages->sgl));
-       if (pc->cpu_page == NULL)
+       pc->cpu_page = kmap(sg_page(obj->pages->sgl));
+       if (pc->cpu_page == NULL) {
+               ret = -ENOMEM;
                goto err_unpin;
+       }
 
        DRM_DEBUG_DRIVER("%s pipe control offset: 0x%08x\n",
                         ring->name, pc->gtt_offset);
This page took 0.032305 seconds and 5 git commands to generate.