summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev
diff options
context:
space:
mode:
authorchs <chs@NetBSD.org>2005-03-02 08:14:26 +0000
committerchs <chs@NetBSD.org>2005-03-02 08:14:26 +0000
commitbd2d26b4502783dbe6a4861272a04efb82f2d2b6 (patch)
tree7a463cbcf72fe9a8cce996060279dafbddc41f7c /sys/arch/atari/dev
parent8125cd1769e20d0f49563b0ae1b4bd538cabfa80 (diff)
getitesp() can return NULL, so check for that in iteopen().
pointed out by Michael Hitch.
Diffstat (limited to 'sys/arch/atari/dev')
-rw-r--r--sys/arch/atari/dev/ite.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/atari/dev/ite.c b/sys/arch/atari/dev/ite.c
index 9b3182b96a5..a8556e1fd26 100644
--- a/sys/arch/atari/dev/ite.c
+++ b/sys/arch/atari/dev/ite.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ite.c,v 1.44 2005/01/23 09:25:52 he Exp $ */
+/* $NetBSD: ite.c,v 1.45 2005/03/02 08:14:26 chs Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.44 2005/01/23 09:25:52 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.45 2005/03/02 08:14:26 chs Exp $");
#include "opt_ddb.h"
@@ -430,6 +430,8 @@ iteopen(dev, mode, devtype, p)
first = 0;
ip = getitesp(dev);
+ if (ip == NULL)
+ return ENXIO;
if ((ip->flags & ITE_ATTACHED) == 0)
return (ENXIO);