diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2011-10-05 10:52:27 -0600 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2011-10-05 10:52:27 -0600 |
| commit | 9514a56753a8d379db36bed424588e1842f2bfcc (patch) | |
| tree | d13cdfcd9473f521c3b108770dba57e81e557a30 /kernel/resource.c | |
| parent | 4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4 (diff) | |
| parent | 6add6967a4a57e2156b96e62f28bcbe1901d16c1 (diff) | |
Merge branch 'for-grant' of git://git.jdl.com/software/linux-3.0 into devicetree/next
Diffstat (limited to 'kernel/resource.c')
| -rw-r--r-- | kernel/resource.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 3b3cedc5259..c8dc249da5c 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -419,6 +419,9 @@ static int __find_resource(struct resource *root, struct resource *old, else tmp.end = root->end; + if (tmp.end < tmp.start) + goto next; + resource_clip(&tmp, constraint->min, constraint->max); arch_remove_reservations(&tmp); @@ -436,8 +439,10 @@ static int __find_resource(struct resource *root, struct resource *old, return 0; } } - if (!this) + +next: if (!this || this->end == root->end) break; + if (this != old) tmp.start = this->end + 1; this = this->sibling; |
