aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2019-11-13 15:31:31 +0000
committerEd Maste <emaste@FreeBSD.org>2022-03-21 15:54:35 +0000
commit8518513d2436386bb16dac9f344679c2a9b75634 (patch)
tree28eaf10f2c02a3ed93ed7dba61d2c3a92d950470
parent803b4b7f22ef9be408d81480cf70ca3afb7c7c53 (diff)
downloadsrc-8518513d2436386bb16dac9f344679c2a9b75634.tar.gz
src-8518513d2436386bb16dac9f344679c2a9b75634.zip
Stop the VESA driver from whining loudly in the dmesg during boot on
systems that use EFI instead of BIOS. (cherry picked from commit 2058e7dbde0f030105007f0f34699fdc0d8e3444) PR: 213045
-rw-r--r--sys/dev/fb/vesa.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c
index 47f768abcc92..ac981cad34ce 100644
--- a/sys/dev/fb/vesa.c
+++ b/sys/dev/fb/vesa.c
@@ -1935,6 +1935,12 @@ vesa_load(void)
if (error == 0)
vesa_bios_info(bootverbose);
+ /* Don't return ENODEV, the upper layers will whine. */
+ if (error == ENODEV) {
+ error = 0;
+ vesa_adp = NULL;
+ }
+
return (error);
}
@@ -1943,8 +1949,12 @@ vesa_unload(void)
{
int error;
+ /* The driver never initialized, so make it easy to unload. */
+ if (vesa_adp == NULL)
+ return (0);
+
/* if the adapter is currently in a VESA mode, don't unload */
- if ((vesa_adp != NULL) && VESA_MODE(vesa_adp->va_mode))
+ if (VESA_MODE(vesa_adp->va_mode))
return (EBUSY);
/*
* FIXME: if there is at least one vty which is in a VESA mode,