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
This commit is contained in:
Giorgos Keramidas 2006-05-12 22:43:07 +00:00
parent 374757c7cb
commit cb9dec9ec1

View File

@ -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 */