drm/i915/guc: Verify result from CTB (de)register action
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Sun, 26 Sep 2021 18:45:42 +0000 (20:45 +0200)
committerMatt Roper <matthew.d.roper@intel.com>
Fri, 1 Oct 2021 19:04:23 +0000 (12:04 -0700)
commit217ecd310d56cca0bfd7c3ee1ff1deafae4ffed1
treee1f29c1dac018c5911d47a5471d3b04ca77d641f
parent9eddd5a9a2aee15d4f0c701388cbdea70e49c6a9
drm/i915/guc: Verify result from CTB (de)register action

In commit b839a869dfc9 ("drm/i915/guc: Add support for data
reporting in GuC responses") we missed the hypothetical case
that GuC might return positive non-zero value as success data.

While that would be lucky treated as error case, and at the
end will result in reporting valid -EIO, in the meantime this
value will be passed to ERR_PTR that could be misleading.

v2: rebased

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210926184545.1407-2-michal.wajdeczko@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c