drm/i915: fix simple_return.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Thu, 5 Mar 2015 14:03:08 +0000 (22:03 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 17 Mar 2015 21:30:00 +0000 (22:30 +0100)
drivers/gpu/drm/i915/intel_ringbuffer.c:435:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ringbuffer.c

index e9858d2e92d0ef8b030e71fd41e064bf771c526e..441e2502b88946ff2d7455a9f26cc32faa87d8fc 100644 (file)
@@ -432,11 +432,7 @@ gen8_render_ring_flush(struct intel_engine_cs *ring,
                        return ret;
        }
 
-       ret = gen8_emit_pipe_control(ring, flags, scratch_addr);
-       if (ret)
-               return ret;
-
-       return 0;
+       return gen8_emit_pipe_control(ring, flags, scratch_addr);
 }
 
 static void ring_write_tail(struct intel_engine_cs *ring,