]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/perf: Initialise err to 0 before looping over ce->engines
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 26 Jul 2019 13:14:58 +0000 (14:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 26 Jul 2019 14:10:53 +0000 (15:10 +0100)
commitceedab70105c292b982ae22aede5baaf83bee4d0
tree05577f052de8b3929f250ce2e94a7e833d5a2ea8
parentaea60e7c5a5ec629e528b523f8a3ea5c508da8ed
drm/i915/perf: Initialise err to 0 before looping over ce->engines

Smatch warning that the loop may be empty causing us to check err before
it had been set. Ensure that it is initialised to 0, just in case.

v2: Refactor the inner loop for better scooping and clarity

Fixes: f02fec1f7de1 ("drm/i915/oa: Reconfigure contexts on the fly")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190726131458.8310-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_perf.c