diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-03-15 20:03:08 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-03-15 20:03:08 +0000 |
commit | 7a98474e0906ac069d94837486659e4625c3cf41 (patch) | |
tree | e6f4d0c586aa8b01085c657132c319cb6f998c96 /sys/arch/i386/isa | |
parent | b9a2c51f2cb93f4b6b2de48dc3ca86e1eef33511 (diff) |
Entries in cd_devs[] may be NULL, so be sure to check for them in your
device open() function.
Diffstat (limited to 'sys/arch/i386/isa')
-rw-r--r-- | sys/arch/i386/isa/joy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/i386/isa/joy.c b/sys/arch/i386/isa/joy.c index 9f1466e8b96..317d0e0957c 100644 --- a/sys/arch/i386/isa/joy.c +++ b/sys/arch/i386/isa/joy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: joy.c,v 1.10 2002/06/02 22:49:59 deraadt Exp $ */ +/* $OpenBSD: joy.c,v 1.11 2006/03/15 20:03:04 miod Exp $ */ /* $NetBSD: joy.c,v 1.3 1996/05/05 19:46:15 christos Exp $ */ /*- @@ -69,6 +69,8 @@ joyopen(dev, flag, mode, p) return (ENXIO); sc = joy_cd.cd_devs[unit]; + if (sc == NULL) + return (ENXIO); if (sc->timeout[i]) return EBUSY; |