Skip to contentSkip to conversation

drm/gma500: fix a missing break in psb_intel_crtc_mode_set

PATCH In review Xiaomeng Tong 2 participants 2 messages Apr 1, 2022 – Apr 6, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/gma500: fix a missing break in psb_intel_crtc_mode_set

Instead of exiting the loop as expected when an entry is found, the list_for_each_entry() continues until the traversal is complete. when found the entry, add a break after the switch statement.

---
 drivers/gpu/drm/gma500/psb_intel_display.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/gma500/psb_intel_display.c +2 -0
index dc467996cce4..9a5ea06a1a8e 100644
@@ -135,6 +135,8 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,
 			is_tv = true;
 			break;
 		}
+
+		break;
 	}
 	drm_connector_list_iter_end(&conn_iter);
 
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 6 lines · Xiaomeng Tong

Instead of exiting the loop as expected when an entry is found, the list_for_each_entry() continues until the traversal is complete. when found the entry, add a break after the switch statement.

Thanks for the patch
Applied to drm-misc-next

Quoted 20 lines
---
 drivers/gpu/drm/gma500/psb_intel_display.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/gma500/psb_intel_display.c +2 -1
index dc467996cce4..9a5ea06a1a8e 100644
@@ -135,6 +135,8 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,
                        is_tv = true;
                        break;
                }
+
+               break;
        }
        drm_connector_list_iter_end(&conn_iter);
 
--

2.17.1