s390/qeth: don't worry about IPs on VLAN removal
[linux-2.6-microblaze.git] / kernel / resource.c
index e270b50..2af6c03 100644 (file)
@@ -651,7 +651,8 @@ static int __find_resource(struct resource *root, struct resource *old,
                        alloc.start = constraint->alignf(constraint->alignf_data, &avail,
                                        size, constraint->align);
                        alloc.end = alloc.start + size - 1;
-                       if (resource_contains(&avail, &alloc)) {
+                       if (alloc.start <= alloc.end &&
+                           resource_contains(&avail, &alloc)) {
                                new->start = alloc.start;
                                new->end = alloc.end;
                                return 0;