summaryrefslogtreecommitdiff
path: root/linux-core/drm_crtc_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_crtc_helper.c')
-rw-r--r--linux-core/drm_crtc_helper.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/linux-core/drm_crtc_helper.c b/linux-core/drm_crtc_helper.c
index a8c44b76..fcb1243c 100644
--- a/linux-core/drm_crtc_helper.c
+++ b/linux-core/drm_crtc_helper.c
@@ -662,7 +662,14 @@ bool drm_helper_initial_config(struct drm_device *dev, bool can_grow)
*/
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
- struct drm_crtc *crtc = connector->encoder->crtc;
+ struct drm_encoder *encoder = connector->encoder;
+ struct drm_crtc *crtc;
+
+ if (!encoder)
+ continue;
+
+ crtc = connector->encoder->crtc;
+
/* can't setup the connector if there's no assigned mode */
if (!crtc || !crtc->desired_mode)
continue;