drivers/i915: Fix unnoticed failure of init_ring_common()
authorKonrad Zapalowicz <bergo.torino@gmail.com>
Thu, 19 Jun 2014 17:07:15 +0000 (19:07 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 19 Jun 2014 18:59:52 +0000 (20:59 +0200)
This commit add check for return value of init_ring_common() in the
init_render_ring(). Now, when failure is detected the error code is
propagated to the caller instead of being ignored.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ringbuffer.c

index b96edaf905de37aa5947c50db0765fea86668cea..2faef2605e97e399beb81c1dd4dfeebed01dea16 100644 (file)
@@ -604,6 +604,8 @@ static int init_render_ring(struct intel_engine_cs *ring)
        struct drm_device *dev = ring->dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
        int ret = init_ring_common(ring);
+       if (ret)
+               return ret;
 
        /* WaTimedSingleVertexDispatch:cl,bw,ctg,elk,ilk,snb */
        if (INTEL_INFO(dev)->gen >= 4 && INTEL_INFO(dev)->gen < 7)