⬢ DragonFlyBSD Kernel Audit
DF-5028 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/drm/radeon/dce6_afmt.c
+++ b/sys/dev/drm/radeon/dce6_afmt.c
@@ -102,7 +102,7 @@
 				if (radeon_encoder_is_digital(encoder)) {
 					radeon_encoder = to_radeon_encoder(encoder);
 					dig = radeon_encoder->enc_priv;
-					if (dig->pin == pin)
+					if (dig && dig->pin == pin)
 						pin_count++;
 				}
 			}
--- a/sys/dev/drm/radeon/radeon_audio.c
+++ b/sys/dev/drm/radeon/radeon_audio.c
@@ -457,6 +457,8 @@
 		return;
 
 	dig = radeon_encoder->enc_priv;
+	if (!dig)
+		return;
 
 	if (status == connector_status_connected) {
 		if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {