]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Fix uninitialised variable in intel_context_create_request.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fri, 18 Sep 2020 11:12:08 +0000 (13:12 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 21 Sep 2020 09:09:46 +0000 (11:09 +0200)
In case backoff fails with an error, we return an undefined rq,
assign err to rq correctly.

Fixes: a52941123592 ("drm/i915: Use ww pinning for intel_context_create_request()")
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200918111208.1392128-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gt/intel_context.c

index d301dda1b2617b53f769f47b9ea1d5d1724449d8..92a3f25c400636b195f92041aaccaebc460e0be0 100644 (file)
@@ -472,6 +472,7 @@ retry:
                err = i915_gem_ww_ctx_backoff(&ww);
                if (!err)
                        goto retry;
+               rq = ERR_PTR(err);
        } else {
                rq = ERR_PTR(err);
        }