Documentation: lzo: document part of the encoding
[pandora-kernel.git] / kernel / resource.c
index da14b8d..60c5a38 100644 (file)
@@ -351,15 +351,12 @@ static int find_next_iomem_res(struct resource *res, char *name,
        end = res->end;
        BUG_ON(start >= end);
 
-       read_lock(&resource_lock);
-
-       if (first_level_children_only) {
-               p = iomem_resource.child;
+       if (first_level_children_only)
                sibling_only = true;
-       } else
-               p = &iomem_resource;
 
-       while ((p = next_resource(p, sibling_only))) {
+       read_lock(&resource_lock);
+
+       for (p = iomem_resource.child; p; p = next_resource(p, sibling_only)) {
                if (p->flags != res->flags)
                        continue;
                if (name && strcmp(p->name, name))