diff options
author | njl <njl@FreeBSD.org> | 2005-02-08 18:03:17 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-02-08 18:03:17 +0000 |
commit | cc21fc94e937c01b8c5b55ca7fbc8881f5156b62 (patch) | |
tree | ab7084c446a1e9748791a3447dc00a41cd08e104 /sys/kern/subr_bus.c | |
parent | 21180427d3fde15a1feaea08b7c49ba07bece76d (diff) | |
download | FreeBSD-src-cc21fc94e937c01b8c5b55ca7fbc8881f5156b62.zip FreeBSD-src-cc21fc94e937c01b8c5b55ca7fbc8881f5156b62.tar.gz |
Maxunit is inclusive so fix off-by-one in previous commit.
Diffstat (limited to 'sys/kern/subr_bus.c')
-rw-r--r-- | sys/kern/subr_bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index b63b926..4179fc7 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1598,7 +1598,7 @@ device_find_child(device_t dev, const char *classname, int unit) if (child && child->parent == dev) return (child); } else { - for (unit = 0; unit < devclass_get_maxunit(dc); unit++) { + for (unit = 0; unit <= devclass_get_maxunit(dc); unit++) { child = devclass_get_device(dc, unit); if (child && child->parent == dev) return (child); |