Merge "disp: msm: dp: check branch device when adding mst sim port"

This commit is contained in:
qctecmdr
2020-07-11 09:42:45 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -267,6 +267,10 @@ static void dp_mst_sim_add_port(struct dp_mst_private *mst,
struct drm_dp_mst_port *port; struct drm_dp_mst_port *port;
mstb = mst->mst_mgr.mst_primary; mstb = mst->mst_mgr.mst_primary;
if (!mstb) {
DP_ERR("Unable to add port. mst branch device was destroyed\n");
return;
}
port = kzalloc(sizeof(*port), GFP_KERNEL); port = kzalloc(sizeof(*port), GFP_KERNEL);
if (!port) if (!port)