drm/i915/selftests: Handle a potential failure of intel_ring_begin
authorOscar Mateo <oscar.mateo@intel.com>
Mon, 16 Apr 2018 21:57:01 +0000 (14:57 -0700)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Apr 2018 10:40:27 +0000 (11:40 +0100)
commit94f8dfc6cdfc3c48c3aea59ce528fa93cb54a69f
tree4a878caff37255d95fa80793db31f0aabd80b36c
parent9f172f6fbd243759c808d97bd83c95e49325b2c9
drm/i915/selftests: Handle a potential failure of intel_ring_begin

Silence smatch over:

drivers/gpu/drm/i915/selftests/intel_workarounds.c:58 read_nonprivs() error: 'cs' dereferencing possible ERR_PTR()

by handling a potential (but unlikely) failure of intel_ring_begin.

Fixes: f4ecfbfc32ed ("drm/i915: Check whitelist registers across resets")
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/1523915821-30624-1-git-send-email-oscar.mateo@intel.com
drivers/gpu/drm/i915/selftests/intel_workarounds.c