edid: fix edid_get_timing_validate() mode_valid lookup
authorNeil Armstrong <narmstrong@baylibre.com>
Mon, 29 Jul 2019 13:35:18 +0000 (15:35 +0200)
committerAnatolij Gustschin <agust@denx.de>
Mon, 29 Jul 2019 17:14:58 +0000 (19:14 +0200)
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

index f244d26e04be491f71cf912a9aba8c9b848c0a0f..f99f42dc406743495b2317b270f05f7623a2f26b 100644 (file)
@@ -202,7 +202,9 @@ int edid_get_timing_validate(u8 *buf, int buf_size,
                                                         timing);
                        else
                                timing_done = true;
                                                         timing);
                        else
                                timing_done = true;
-                       break;
+
+                       if (timing_done)
+                               break;
                }
        }
        if (!timing_done)
                }
        }
        if (!timing_done)