drm/i915: Remove unnecessary null check in execlists_context_unqueue
authorMichel Thierry <michel.thierry@intel.com>
Mon, 27 Apr 2015 11:31:44 +0000 (12:31 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 27 May 2015 11:20:51 +0000 (13:20 +0200)
commit 53292cdb066950611e5bc2e0eb109c7edb42af78 ("drm/i915: Workaround
to avoid lite restore with HEAD==TAIL") added a check for req0 != null
which is unnecessary.

The only way req0 could be null is if the list was empty, and this is
already addressed at the beginning of execlists_context_unqueue().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_lrc.c

index 96ae90affad5c29438144ea2a1893244c152fca4..9f5485ddcbe6e15d1b18871ae9aebd03b1035c16 100644 (file)
@@ -427,7 +427,7 @@ static void execlists_context_unqueue(struct intel_engine_cs *ring)
                 * WaIdleLiteRestore: make sure we never cause a lite
                 * restore with HEAD==TAIL
                 */
-               if (req0 && req0->elsp_submitted) {
+               if (req0->elsp_submitted) {
                        /*
                         * Apply the wa NOOPS to prevent ring:HEAD == req:TAIL
                         * as we resubmit the request. See gen8_emit_request()