diff options
Diffstat (limited to 'kernel/resource.c')
-rw-r--r-- | kernel/resource.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 35c99ac02c7..52f696f11ad 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -266,7 +266,7 @@ static int find_resource(struct resource *root, struct resource *new, | |||
266 | new->start = (new->start + align - 1) & ~(align - 1); | 266 | new->start = (new->start + align - 1) & ~(align - 1); |
267 | if (alignf) | 267 | if (alignf) |
268 | alignf(alignf_data, new, size, align); | 268 | alignf(alignf_data, new, size, align); |
269 | if (new->start < new->end && new->end - new->start + 1 >= size) { | 269 | if (new->start < new->end && new->end - new->start >= size - 1) { |
270 | new->end = new->start + size - 1; | 270 | new->end = new->start + size - 1; |
271 | return 0; | 271 | return 0; |
272 | } | 272 | } |