From 57f384eed54f9867fcd6649f461d0934d6eaa998 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Thu, 2 Jun 2022 09:52:32 +0200 Subject: [PATCH] gop: Ensure QueryMode() is called properly --- common/drivers/gop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/drivers/gop.c b/common/drivers/gop.c index 0fbd0984..68723371 100644 --- a/common/drivers/gop.c +++ b/common/drivers/gop.c @@ -160,10 +160,10 @@ bool init_gop(struct fb_info *ret, if (status) { panic(false, "gop: Initialisation failed"); } + status = gop->QueryMode(gop, gop->Mode == NULL ? 0 : gop->Mode->Mode, + &mode_info_size, &mode_info); } - status = gop->QueryMode(gop, gop->Mode->Mode, &mode_info_size, &mode_info); - if (status) { panic(false, "gop: Initialisation failed"); }