drm/i915/dp: Check error return during DPCD capability queries
authorImre Deak <imre.deak@intel.com>
Wed, 10 May 2017 09:21:48 +0000 (12:21 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 10 May 2017 10:47:40 +0000 (13:47 +0300)
commit9bacd4b1f8553428c5723e4c8f2ca491b400e429
tree15055c8a0d3c3adfa228567b4afe9f6ba6519305
parented58570f55e2c57553161413881c7947f0952b5c
drm/i915/dp: Check error return during DPCD capability queries

The assumptions of these users of drm_dp_dpcd_readb() is that the passed
in output buffer won't change in case of error, but this isn't
guaranteed. Fix this by treating any error as the lack of the given
capability.

In case of DP_SINK_DEVICE_AUX_FRAME_SYNC_CAP an error would leave the
buffer uninitialized even with the above assumption.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1494408113-379-2-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/intel_dp.c