From 8af598ac3f3b0382ee52d26845e855c99db1c79e Mon Sep 17 00:00:00 2001 From: Stanislav Lisovskiy Date: Wed, 3 Oct 2018 14:53:33 +0300 Subject: [PATCH] Experimental patch to check checking for mst_primary availability helps against kernel oops. mst_primary might become assigned to NULL if device wasn't detected properly with previous intel_dp_long_pulse. --- drivers/gpu/drm/drm_dp_mst_topology.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 5ff1d79b86c4..fb90ed4cdc3a 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -1273,6 +1273,12 @@ static struct drm_dp_mst_branch *drm_dp_get_mst_branch_device(struct drm_dp_mst_ /* find the port by iterating down */ mutex_lock(&mgr->lock); + + if (!mgr->mst_primary) { + mstb = NULL; + goto out; + } + mstb = mgr->mst_primary; for (i = 0; i < lct - 1; i++) { -- 2.17.1