diff mbox series

[U-Boot] edid: fix edid_get_timing_validate() mode_valid lookup

Message ID 20190729133518.8287-1-narmstrong@baylibre.com
State Accepted
Commit 2f6dc79a4ff1a35331d85566a426120801c1f20a
Delegated to: Anatolij Gustschin
Headers show
Series [U-Boot] edid: fix edid_get_timing_validate() mode_valid lookup | expand

Commit Message

Neil Armstrong July 29, 2019, 1:35 p.m. UTC
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>
---
 common/edid.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Anatolij Gustschin July 29, 2019, 5:16 p.m. UTC | #1
On Mon, 29 Jul 2019 15:35:18 +0200
Neil Armstrong narmstrong@baylibre.com wrote:
...
>  common/edid.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied to u-boot-video/master, thanks!

--
Anatolij
diff mbox series

Patch

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)