summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/resource.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 6eff1a743d8c..02ad13f53306 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -222,6 +222,8 @@ static int __release_resource(struct resource *old, bool release_child)
}
}
+ WARN_ON(old->child);
+
p = &old->parent->child;
for (;;) {
tmp = *p;