Check unit.

This bug seems to be introduced on merging the bus.h patches.
This commit is contained in:
minoura 1999-03-22 03:20:51 +00:00
parent 7799105c49
commit c9e79552c8
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite.c,v 1.14 1999/03/16 16:30:19 minoura Exp $ */ /* $NetBSD: ite.c,v 1.15 1999/03/22 03:20:51 minoura Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -367,7 +367,8 @@ iteopen(dev, mode, devtype, p)
register int error; register int error;
int first = 0; int first = 0;
ip = getitesp(dev); if (unit >= ite_cd.cd_ndevs || (ip = getitesp(dev)) == NULL)
return (ENXIO);
if (!ite_tty[unit]) { if (!ite_tty[unit]) {
tp = ite_tty[unit] = ttymalloc(); tp = ite_tty[unit] = ttymalloc();
tty_attach(tp); tty_attach(tp);