From: kbuild test robot Date: Thu, 5 Mar 2015 14:03:08 +0000 (+0800) Subject: drm/i915: fix simple_return.cocci warnings X-Git-Tag: firefly_0821_release~176^2~1470^2~58^2~329 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6e0b3f8d64252664f240f0cbd23e3d22ce3df001;p=firefly-linux-kernel-4.4.55.git drm/i915: fix simple_return.cocci warnings 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 Signed-off-by: Fengguang Wu Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index e9858d2e92d0..441e2502b889 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -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,