From c9e79552c848fbae4c315b70c20ebea2bf4939cd Mon Sep 17 00:00:00 2001 From: minoura Date: Mon, 22 Mar 1999 03:20:51 +0000 Subject: [PATCH] Check unit. This bug seems to be introduced on merging the bus.h patches. --- sys/arch/x68k/dev/ite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arch/x68k/dev/ite.c b/sys/arch/x68k/dev/ite.c index 8f8e6327c413..2099ef56823f 100644 --- a/sys/arch/x68k/dev/ite.c +++ b/sys/arch/x68k/dev/ite.c @@ -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. @@ -367,7 +367,8 @@ iteopen(dev, mode, devtype, p) register int error; int first = 0; - ip = getitesp(dev); + if (unit >= ite_cd.cd_ndevs || (ip = getitesp(dev)) == NULL) + return (ENXIO); if (!ite_tty[unit]) { tp = ite_tty[unit] = ttymalloc(); tty_attach(tp);