diff -uF^[a-zA-Z_][a-z A-Z0-9_]*(.*[^;]$ arch/x68k/dev/ite.c.orig arch/x68k/dev/ite.c --- arch/x68k/dev/ite.c.orig Wed Jul 1 20:15:22 1998 +++ arch/x68k/dev/ite.c Tue Jul 14 00:47:48 1998 @@ -282,9 +282,10 @@ iteon(dev, flag) int flag; { int unit = UNIT(dev); - struct ite_softc *ip = getitesp(unit); + struct ite_softc *ip; - if (unit < 0 || unit >= ite_cd.cd_ndevs || (ip->flags&ITE_ALIVE) == 0) + if (unit < 0 || unit >= ite_cd.cd_ndevs || + (ip = getitesp(unit)) == NULL || (ip->flags&ITE_ALIVE) == 0) return(ENXIO); /* force ite active, overriding graphics mode */ if (flag & 1) { @@ -316,10 +317,11 @@ iteoff(dev, flag) int flag; { int unit = UNIT(dev); - register struct ite_softc *ip = getitesp(unit); + register struct ite_softc *ip; /* XXX check whether when call from grf.c */ - if (unit < 0 || unit >= ite_cd.cd_ndevs || (ip->flags&ITE_ALIVE) == 0) + if (unit < 0 || unit >= ite_cd.cd_ndevs || + (ip = getitesp(unit)) == NULL || (ip->flags&ITE_ALIVE) == 0) return; if (flag & 2) ip->flags |= ITE_INGRF; @@ -566,10 +568,10 @@ ite_reinit(dev) int unit = UNIT(dev); /* XXX check whether when call from grf.c */ - if (unit < 0 || unit >= ite_cd.cd_ndevs) + if (unit < 0 || unit >= ite_cd.cd_ndevs || + (ip = getitesp(unit)) == NULL) return; - ip = getitesp(dev); ip->flags &= ~ITE_INITED; iteinit(dev); }