vbe: Convert some checks to assertions
authorSimon Glass <sjg@chromium.org>
Thu, 16 Jan 2025 01:27:06 +0000 (18:27 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 22 Jan 2025 15:47:49 +0000 (09:47 -0600)
commit27008ce51388faa448bf7b20b7e8104b8bc972a6
tree92e92d35800c4ca824fbf9fe23ae3964c49545c0
parent00f521903ee3768ef2327dbcfdac9029f243f3cd
vbe: Convert some checks to assertions

VBE is currently quite careful with function arguments because it is
used in VPL which cannot be updated after manufacture. Bugs can cause
security holes.

Unfortunately this adds to code size.

In several cases we are reading values from a devicetree which is part
of U-Boot (or at least VPL) and so known to be good. Also, in several
places, getting bad values does not matter.

So change a few checks to assert() to reduce code size.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/vbe_simple.c