diff options
| author | Scott Long <scottl@FreeBSD.org> | 2019-11-13 15:31:31 +0000 |
|---|---|---|
| committer | Scott Long <scottl@FreeBSD.org> | 2019-11-13 15:31:31 +0000 |
| commit | 2058e7dbde0f030105007f0f34699fdc0d8e3444 (patch) | |
| tree | 514109ec3fadf25b8f3e0aaad0d9f9580a721595 /sys/dev/fb/vesa.c | |
| parent | b3a25d29932d7f1806f2b45f0901abadc22b81d0 (diff) | |
Notes
Diffstat (limited to 'sys/dev/fb/vesa.c')
| -rw-r--r-- | sys/dev/fb/vesa.c | 12 |
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, |
