diff options
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 964c5eb1fada..8ba22c039a11 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -775,8 +775,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
775 | fail_set_mode: | 775 | fail_set_mode: |
776 | set->crtc->enabled = save_enabled; | 776 | set->crtc->enabled = save_enabled; |
777 | count = 0; | 777 | count = 0; |
778 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) | 778 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
779 | if (!connector->encoder) | ||
780 | continue; | ||
781 | |||
779 | connector->encoder->crtc = save_crtcs[count++]; | 782 | connector->encoder->crtc = save_crtcs[count++]; |
783 | } | ||
780 | fail_no_encoder: | 784 | fail_no_encoder: |
781 | kfree(save_crtcs); | 785 | kfree(save_crtcs); |
782 | count = 0; | 786 | count = 0; |