Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/dp_mst: Don't return error code when crtc is null

[Why]
In certain cases the crtc can be NULL and returning -EINVAL causes
atomic check to fail when it shouln't. This leads to valid
configurations failing because atomic check fails.

[How]
Don't early return if crtc is null

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
[added stable cc]
Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: 8ec046716ca8 ("drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs")
Cc: <stable@vger.kernel.org> # v5.6+
Link: https://patchwork.freedesktop.org/patch/msgid/20200814170140.24917-1-Bhawanpreet.Lakha@amd.com

authored by

Bhawanpreet Lakha and committed by
Lyude Paul
88fee1c9 836b194d

+2 -2
+2 -2
drivers/gpu/drm/drm_dp_mst_topology.c
··· 4990 4990 4991 4991 crtc = conn_state->crtc; 4992 4992 4993 - if (WARN_ON(!crtc)) 4994 - return -EINVAL; 4993 + if (!crtc) 4994 + continue; 4995 4995 4996 4996 if (!drm_dp_mst_dsc_aux_for_port(pos->port)) 4997 4997 continue;