--- linux-4.3.0-rc5/drivers/gpu/drm/drm_dp_mst_topology.c.before 2015-10-14 20:17:05.089613515 -0700 +++ linux-4.3.0-rc5/drivers/gpu/drm/drm_dp_mst_topology.c 2015-10-14 23:36:50.795485708 -0700 @@ -1194,17 +1194,18 @@ static struct drm_dp_mst_branch *drm_dp_ list_for_each_entry(port, &mstb->ports, next) { if (port->port_num == port_num) { - if (!port->mstb) { + mstb = port->mstb; + if (!mstb) { DRM_ERROR("failed to lookup MSTB with lct %d, rad %02x\n", lct, rad[0]); - return NULL; + goto out; } - mstb = port->mstb; break; } } } kref_get(&mstb->kref); + out: mutex_unlock(&mgr->lock); return mstb; }