drm/dp_mst: fix drm_dp_dpcd_read return value checks
authorSimon Ser <contact@emersion.fr>
Thu, 10 Feb 2022 15:40:25 +0000 (15:40 +0000)
committerSimon Ser <contact@emersion.fr>
Fri, 29 Jul 2022 11:55:39 +0000 (13:55 +0200)
commit2ac6cdd581f48c8f68747156fde5868486a44985
tree32a0cb9a9386fd9aafaf8286c85f6cd6f9e05554
parent5d2f2e8b3a36328a3981996bb20c32d8a0e53b46
drm/dp_mst: fix drm_dp_dpcd_read return value checks

drm_dp_dpcd_read returns the number of bytes read. The previous code
would print garbage on DPCD error, and would exit with on error on
success.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: cb897542c6d2 ("drm/dp_mst: Fix W=1 warnings")
Cc: Lyude Paul <lyude@redhat.com>
Cc: Benjamin Gaignard <benjamin.gaignard@st.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/473500/
drivers/gpu/drm/display/drm_dp_mst_topology.c