diff options
author | keramida <keramida@FreeBSD.org> | 2006-05-12 22:43:07 +0000 |
---|---|---|
committer | keramida <keramida@FreeBSD.org> | 2006-05-12 22:43:07 +0000 |
commit | 7770ce8a2ff98cb74122ccdf1524ea21e91408c0 (patch) | |
tree | d0883caf3e382e3b5e3145b7e62734193133dc3f /sys/dev/syscons/syscons.c | |
parent | c0cb1adae1f04371525d54995df49359196347ad (diff) | |
download | FreeBSD-src-7770ce8a2ff98cb74122ccdf1524ea21e91408c0.zip FreeBSD-src-7770ce8a2ff98cb74122ccdf1524ea21e91408c0.tar.gz |
Check the return code of sc_clean_up() in the only place where it
was not checked at all. There is only one case when sc_clean_up()
can fail, because of wait_scrn_saver_stop(), but it doesn't hurt
to check anyway.
Reviewed by: rodrigc
Found by: Coverity Prevent
Diffstat (limited to 'sys/dev/syscons/syscons.c')
-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 d98611b..503bed9 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 */ |