Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/bktr Fix check in device open.



details:   https://anonhg.NetBSD.org/src/rev/e17834bf6ce0
branches:  trunk
changeset: 516209:e17834bf6ce0
user:      wiz <wiz%NetBSD.org@localhost>
date:      Thu Oct 18 16:08:05 2001 +0000

description:
Fix check in device open.
Patch by KUROSAWA Takahiro in kern/14289.

diffstat:

 sys/dev/pci/bktr/bktr_os.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r ead7315af284 -r e17834bf6ce0 sys/dev/pci/bktr/bktr_os.c
--- a/sys/dev/pci/bktr/bktr_os.c        Thu Oct 18 15:52:57 2001 +0000
+++ b/sys/dev/pci/bktr/bktr_os.c        Thu Oct 18 16:08:05 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bktr_os.c,v 1.20 2001/09/18 18:15:52 wiz Exp $ */
+/*     $NetBSD: bktr_os.c,v 1.21 2001/10/18 16:08:05 wiz Exp $ */
 
 /* FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp */
 
@@ -1620,7 +1620,7 @@
        unit = UNIT(dev);
 
        /* unit out of range */
-       if ((unit > bktr_cd.cd_ndevs) || (bktr_cd.cd_devs[unit] == NULL))
+       if ((unit >= bktr_cd.cd_ndevs) || (bktr_cd.cd_devs[unit] == NULL))
                return(ENXIO);
 
        bktr = bktr_cd.cd_devs[unit];



Home | Main Index | Thread Index | Old Index