From c0e9a01ab6e3dd3e7fff6b0de08f183761f31790 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 15 Jul 2021 01:20:28 +0000 Subject: [PATCH] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable() From Douglas Anderson 0cd39c96574d19e234cee971868c82c3769c2ee6 in linux 5.10.y/5.10.50 bab5cca7e609952b069a550e39fe4893149fb658 in mainline linux --- sys/dev/pci/drm/drm_bridge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/pci/drm/drm_bridge.c b/sys/dev/pci/drm/drm_bridge.c index d5bad072bfd..3bee172bce6 100644 --- a/sys/dev/pci/drm/drm_bridge.c +++ b/sys/dev/pci/drm/drm_bridge.c @@ -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); -- 2.20.1