mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 08:09:08 +00:00
Maxunit is inclusive so fix off-by-one in previous commit.
This commit is contained in:
parent
5b68bf38ab
commit
7990a18c7b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141532
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user