From deb49b22d9579fda5ce2fe6af2080ffc2de165ee Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 28 May 2018 17:47:09 +0200 Subject: [vesafb] Fix resetting console to text mode by passing NULL config --- src/arch/x86/interface/pcbios/vesafb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/arch/x86/interface') diff --git a/src/arch/x86/interface/pcbios/vesafb.c b/src/arch/x86/interface/pcbios/vesafb.c index 9cdffd32c..21b3e74c4 100644 --- a/src/arch/x86/interface/pcbios/vesafb.c +++ b/src/arch/x86/interface/pcbios/vesafb.c @@ -504,10 +504,7 @@ static void vesafb_putchar ( int character ) { static int vesafb_configure ( struct console_configuration *config ) { int rc; - if ( config == NULL ) { - return 0; - } - if ( config->lazy_update ) { + if ( config && config->lazy_update ) { if ( vesafb_console.disabled ) { /* --update mode with disabled console -> nothing to do */ return 0; @@ -537,7 +534,8 @@ static int vesafb_configure ( struct console_configuration *config ) { } /* Do nothing more unless we have a usable configuration */ - if ( ( config->width == 0 ) || ( config->height == 0 ) ) { + if ( ( config == NULL ) || + ( config->width == 0 ) || ( config->height == 0 ) ) { return 0; } -- cgit v1.2.3-55-g7522