drm/i915/selftests: Always initialise err
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 14 Nov 2017 22:33:46 +0000 (22:33 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 14 Nov 2017 23:50:49 +0000 (23:50 +0000)
commit6e1281412ab9e6772d8f6c26e592181fcdd2ae0c
tree102892ea5986e3bcfa3a106191805ce3257b8a58
parent7469c62cb6549cf72bfd4d63cb3fc5f34eb0b2d0
drm/i915/selftests: Always initialise err

smatch does not track initialised values as well as gcc, and this
triggers many warnings by smatch not presented by gcc. Silence smatch by
initialising the error values to -ENODEV, which we use to denote
internal errors. (If we see a selftest fail with a silent -ENODEV, we
know smatch was right!)

v2: smatch was right about igt_create_vma(), it may unlikely fail on the
first object allocation which we want to be loud about.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114223346.25958-1-chris@chris-wilson.co.uk
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
drivers/gpu/drm/i915/selftests/i915_gem_context.c
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
drivers/gpu/drm/i915/selftests/i915_gem_request.c
drivers/gpu/drm/i915/selftests/i915_gem_timeline.c
drivers/gpu/drm/i915/selftests/i915_syncmap.c
drivers/gpu/drm/i915/selftests/i915_vma.c