boot: fix vbe_find_first_device()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 23 Aug 2022 08:25:25 +0000 (10:25 +0200)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Aug 2022 22:32:59 +0000 (16:32 -0600)
commitd81eeacd48f760516abf12e69aba4ce5dd44545f
tree2a0af2e9adaec6e17bdd338f03248999f0516e48
parenta7091f3f8c859a29ad63b94952472bd93d60488c
boot: fix vbe_find_first_device()

uclass_find_first_device() may return NULL if no device for the uclass
exists. Handle this case gracefully.

Addresses-Coverity: CID 356244 ("Null pointer dereferences (FORWARD_NULL)")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
boot/vbe.c