summaryrefslogtreecommitdiff
path: root/kernel/resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 7ea4306503c5..6eff1a743d8c 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -214,6 +214,14 @@ static int __release_resource(struct resource *old, bool release_child)
{
struct resource *tmp, **p, *chd;
+ if (old->child) {
+ static int warned;
+ if (warned < 5) {
+ warned++;
+ WARN_ON(1);
+ }
+ }
+
p = &old->parent->child;
for (;;) {
tmp = *p;