drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()
authorjsg <jsg@openbsd.org>
Thu, 15 Jul 2021 01:20:28 +0000 (01:20 +0000)
committerjsg <jsg@openbsd.org>
Thu, 15 Jul 2021 01:20:28 +0000 (01:20 +0000)
From Douglas Anderson
0cd39c96574d19e234cee971868c82c3769c2ee6 in linux 5.10.y/5.10.50
bab5cca7e609952b069a550e39fe4893149fb658 in mainline linux

sys/dev/pci/drm/drm_bridge.c

index d5bad07..3bee172 100644 (file)
@@ -522,6 +522,9 @@ void drm_bridge_chain_pre_enable(struct drm_bridge *bridge)
        list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) {
                if (iter->funcs->pre_enable)
                        iter->funcs->pre_enable(iter);
+
+               if (iter == bridge)
+                       break;
        }
 }
 EXPORT_SYMBOL(drm_bridge_chain_pre_enable);