svn commit: r354683 - head/sys/dev/fb

Scott Long scottl at FreeBSD.org
Wed Nov 13 15:31:32 UTC 2019


Author: scottl
Date: Wed Nov 13 15:31:31 2019
New Revision: 354683
URL: https://svnweb.freebsd.org/changeset/base/354683

Log:
  Stop the VESA driver from whining loudly in the dmesg during boot on
  systems that use EFI instead of BIOS.

Modified:
  head/sys/dev/fb/vesa.c

Modified: head/sys/dev/fb/vesa.c
==============================================================================
--- head/sys/dev/fb/vesa.c	Wed Nov 13 14:28:07 2019	(r354682)
+++ head/sys/dev/fb/vesa.c	Wed Nov 13 15:31:31 2019	(r354683)
@@ -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,


More information about the svn-src-all mailing list