diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/syscons/syscons.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index d98611b80c8a..503bed9d600b 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -1031,8 +1031,10 @@ scioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) case VT_ACTIVATE: /* switch to screen *data */ i = (*(intptr_t *)data == 0) ? scp->index : (*(intptr_t *)data - 1); s = spltty(); - sc_clean_up(sc->cur_scp); + error = sc_clean_up(sc->cur_scp); splx(s); + if (error) + return error; return sc_switch_scr(sc, i); case VT_WAITACTIVE: /* wait for switch to occur */ |