kernel/device_manager: don't insert device node before nodes of the same priority

fix #16512

Change-Id: I76ce4cfc9346492008c11ca53302ca4df6a6b514
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5393
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
Jérôme Duval 2022-06-21 18:32:01 +02:00 committed by waddlesplash
parent c27c987075
commit 032b1422c2

View File

@ -1454,7 +1454,7 @@ device_node::AddChild(device_node* node)
device_node* before = NULL;
while (iterator.HasNext()) {
device_node* child = iterator.Next();
if (child->Priority() <= priority) {
if (child->Priority() < priority) {
before = child;
break;
}