DragonFlyBSD Kernel Audit
DF-1777 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/drm/radeon/radeon_dp_mst.c b/sys/dev/drm/radeon/radeon_dp_mst.c
--- a/sys/dev/drm/radeon/radeon_dp_mst.c
+++ b/sys/dev/drm/radeon/radeon_dp_mst.c
@@ -286,6 +286,10 @@
 	drm_connector_init(dev, connector, &radeon_dp_mst_connector_funcs, DRM_MODE_CONNECTOR_DisplayPort);
 	drm_connector_helper_add(connector, &radeon_dp_mst_connector_helper_funcs);
 	radeon_connector->mst_encoder = radeon_dp_create_fake_mst_encoder(master);
+	if (!radeon_connector->mst_encoder) {
+		DRM_ERROR("Failed to create MST encoder\n");
+		return NULL;
+	}
 
 	drm_object_attach_property(&connector->base, dev->mode_config.path_property, 0);
 	drm_object_attach_property(&connector->base, dev->mode_config.tile_property, 0);