edid: fix edid_get_timing_validate() mode_valid lookup
Add a condition to the break in the modes lookup, without this
when the first mode is not valid, then edid_get_timing_validate()
return an error instead of checking the next modes.
Fixes: 1c1ed441b0d1 ("edid: add edid_get_timing_validate() variant to filter out edid modes")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
diff --git a/common/edid.c b/common/edid.c
index f244d26..f99f42d 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -202,7 +202,9 @@
timing);
else
timing_done = true;
- break;
+
+ if (timing_done)
+ break;
}
}
if (!timing_done)