summaryrefslogtreecommitdiff
path: root/common/edid.c
diff options
context:
space:
mode:
authorNeil Armstrong <narmstrong@baylibre.com>2019-07-29 15:35:18 +0200
committerAnatolij Gustschin <agust@denx.de>2019-07-29 19:14:58 +0200
commit2f6dc79a4ff1a35331d85566a426120801c1f20a (patch)
tree9d3830943aec17bf9210af7d03e4f20bdc7df823 /common/edid.c
parent970baf16d1322d3930a57fc78ddfb15d594d690c (diff)
downloadu-boot-2f6dc79a4ff1a35331d85566a426120801c1f20a.tar.gz
u-boot-2f6dc79a4ff1a35331d85566a426120801c1f20a.tar.bz2
u-boot-2f6dc79a4ff1a35331d85566a426120801c1f20a.zip
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>
Diffstat (limited to 'common/edid.c')
-rw-r--r--common/edid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/edid.c b/common/edid.c
index f244d26e04..f99f42dc40 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -202,7 +202,9 @@ int edid_get_timing_validate(u8 *buf, int buf_size,
timing);
else
timing_done = true;
- break;
+
+ if (timing_done)
+ break;
}
}
if (!timing_done)